htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Multiple HX-Trigger in Headers not firing events. Single event works

Open jrbenriquez opened this issue 1 year ago • 1 comments

Hi there,

I can get a single event to trigger via a response header

i.e.

HX-Trigger: event1

OR

HX-Trigger: event2

but when I pass in comma separated values as per the docs: HX-Trigger Headers

HX-Trigger: event1, event2

I don't get any events firing after receiving the response. Can confirm that I can trigger the events from the browser's console via

htmx.trigger(htmx.find('body'),'event1')
htmx.trigger(htmx.find('body'),'event2')

I am on HTMX 1.9.0, is this expected behavior? Thanks!

jrbenriquez avatar Jun 03 '24 15:06 jrbenriquez

I am able to reproduce on 1.9.0, but appears to be fixed in the latest version (1.9.12).

update: support was added for this in 1.9.4: https://github.com/bigskysoftware/htmx/pull/1479

samfurr avatar Jun 08 '24 16:06 samfurr

Ah cool, Thanks! Will close

jrbenriquez avatar Jul 05 '24 18:07 jrbenriquez