Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HX-Trigger "Revealed" doesn't work with other triggers. #2289

Open
Lorenzmueller2 opened this issue Feb 8, 2024 · 1 comment
Open

HX-Trigger "Revealed" doesn't work with other triggers. #2289

Lorenzmueller2 opened this issue Feb 8, 2024 · 1 comment

Comments

@Lorenzmueller2
Copy link

If you use hx-trigger="revealed" the trigger works, when scrolled into view, but when you use revealed with another trigger event, for example: hx-trigger="revealed, myCustomEvent from:body" it doesn't trigger the revealed event.

We searched through the code and found the reason.

https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L1581

It checks if hx-trigger is exactly "revealed" and not contains the event "revealed".

Is it a bug or, if it was done on purpose?

@andryyy
Copy link

andryyy commented Feb 8, 2024

Hey, that was recently tracked down by another user who opened this PR. :)

May take a while due to the approaching v2 release, I guess.

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

No branches or pull requests

2 participants