Skip to content

Possible regression with <a href="..." hx-get=".." #3356

@phillip-haydon

Description

@phillip-haydon

I'm wondering if I've missed something in the release notes or if there is a regression with applying hx-get on an <a href=... tag.

In 2.0.4 I have

<a href="..."
     hx-get="..."
     hx-target="..."
     hx-swap="innerHTML">
  Link
</a>

In 2.0.4:

When I click this before htmx has parsed the page, href is used and causes a full navigation to the url. ✅
When htmx is parsed on the page, href is ignored and hx-get picks it up and does a swap on the target. ✅

In 2.0.5:

When I click this before htmx has parsed the page, href is used and causes a full navigation to the url. ✅
When htmx is parsed on the page, hx-get is ignored and it does a full navigation to the url. 🚫

This happens for me just upgrading from 2.0.4 > 2.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions