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

Space before comma leads to hx-trigger being ignored #2897

Open
npt opened this issue Sep 12, 2024 · 2 comments
Open

Space before comma leads to hx-trigger being ignored #2897

npt opened this issue Sep 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@npt
Copy link

npt commented Sep 12, 2024

With hx-trigger="someCustomEvent from:body, load", the trigger on load works. Change it to hx-trigger="someCustomEvent from:body , load", and the trigger on load no longer fires (and htmx:syntax:error is written to the console twice).

I would expect the extra whitespace to be ignored. (This came up when generating HTMX using a Jinja template, where I wanted to conditionally include the load trigger, so now my template is written in a more condensed style than I'd prefer.)

@Telroshan Telroshan added the bug Something isn't working label Sep 12, 2024
@Telroshan
Copy link
Collaborator

Indeed, that's a pretty annoying behavior...
If you'd like to investigate and submit a bugfix PR, feel free to do so!

@MichaelWest22
Copy link
Contributor

@npt fix now in v2.0.3 so please retest and close if it is now resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants