Skip to content

htmx.config.ignoreTitle = true is in conflict with OOB-swapped title top element #3893

Description

@metametadata

Version 2.0.9.

Steps

  1. htmx.config.ignoreTitle = true is set.
  2. The web page has an OOB-swappable title tag in head block: <title hx-swap-oob="outerHTML" id="document-title">One</title>.
  3. Perform an htmx swap where the response contains <title hx-swap-oob="outerHTML" id="document-title">Two</title> as one of the "top" tags in the response.

Expected

The tab title is Two.

Actual

The tab title is One.

Why is this needed?

I use OOB-swappable titles as a workaround for another bug: #3726. And htmx.config.ignoreTitle = true is set to nudge the developers to use this pattern consistently until the bug is fixed.

Notes

Setting htmx.config.ignoreTitle = false or wrapping the title in the response with, say, div helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions