Skip to content

Commit 6e1c96b

Browse files
committed
Register listeners early to stop htmx events from firing before they're ready
For load/revealed triggers, htmx may initiate requests immediately upon DOM readiness, potentially before event listeners such as "htmx:afterRequest" have been registered. Registering listeners in advance resolves this timing issue. It fixes a potential test failure in t/playwright/ticket_inline_edit.t caused by the missing call to the htmx:afterRequest cleanup code. This omission resulted in submitted data containing duplicate id parameters.
1 parent e7ad3d8 commit 6e1c96b

File tree

3 files changed

+396
-396
lines changed

3 files changed

+396
-396
lines changed

lib/RT/Interface/Web.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ sub SquishedJS {
141141

142142
sub JSFiles {
143143
return qw{
144-
htmx.min.js
145144
jquery-3.6.0.min.js
146145
jquery_noconflict.js
146+
init.js
147+
htmx.min.js
147148
tom-select.complete.min.js
148149
popper.min.js
149150
bootstrap.min.js

0 commit comments

Comments
 (0)