Skip to content

htmx:abort not working on elements inside Shadow DOM #3419

@colececil

Description

@colececil

I'm using htmx v2.0.6, and htmx:abort doesn't seem to be working on elements inside the Shadow DOM. This is the case both with directly using htmx.trigger(element, 'htmx:abort') and with using hx-sync (which looks to be using htmx:abort behind the scenes).

Looking at the source code, https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L5098 seems to be the only place listening for that event, and it's doing so directly on body, so I'm guessing maybe the htmx:abort events dispatched from Shadow DOM elements just aren't being picked up by any event listener?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions