Skip to content

Add support for hx-trigger on boosted elements - #4127

Open
xhaggi wants to merge 1 commit into
bigskysoftware:four-devfrom
xhaggi:boost-hx-trigger
Open

xhaggi wants to merge 1 commit into
bigskysoftware:four-devfrom
xhaggi:boost-hx-trigger

Conversation

@xhaggi

@xhaggi xhaggi commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Since htmx 4, boosted <a> and <form> elements ignore hx-trigger. They always fire on click (links) or submit (forms), and trigger modifiers like delay, throttle, once, from, or event filters have no effect.

Corresponding issue: #4126

Testing

I added two tests boosted link should be triggered by custom event and boosted form should be triggered by custom event to test/tests/attributes/hx-boost.js.
It fails without the fix and passes with it.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@xhaggi

xhaggi commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

The test failure is unrelated to my changes, or is it?

The browser was unable to create and start a test page after 30000ms. You can increase this timeout with the browserStartTimeout option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant