bigskysoftware / bigskysoftware/htmx

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

Open
#2,289 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
49.4k
Forks
1.7k
Avg merge
3d 22h
Merged PRs (30d)
30

Description

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](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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.