32 Commits

Author SHA1 Message Date
MichaelWest22
cee310e4d5
Handle not preventing link when inside htmx enabled element (#3396)
* Handle not preventing link when inside htmx enabled element

* Simplify shouldCancel and pass in eltToListenOn to solve from: issue without regressions

* move regex to local variable format
2025-09-07 12:09:05 -06:00
MichaelWest22
448db781ef
add back null check for no form in getRelatedFormData (#3394) 2025-07-27 09:34:50 -06:00
Carson Gross
dc804932a7 fix formatting 2025-07-14 18:21:16 -06:00
MichaelWest22
28fae544c2
Cancel button with inner content form submit properly (#3368)
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2025-07-14 17:41:26 -06:00
Matteo Smaila
b0c87bf363
Bugfix: swap="outerHTML" on <div> with style attribute leaves htmx-swapping class behind (#3341)
* Added regression test for swap=outerHTML unexpected behavior, checked it failes, implemented initial fix in htmx.js that makes (all) test(s) run and pass.

* Renamed variable in my regression test to be more clear.

* I noticed I wasn't using the copies of the attributes I introduced.Tests were passing and I know why, though. This means I miss one more regression test for the bug in cloneAttributes.

* Added one more regression test for the fix in cloneAttributes.

* Made preservation of htmx- prefixed classes more robust in cloneAttributes after I noted they could as well be removed by mergeTo.setAttribute in the second forEach loop.

* Started as a typo-fix, ended up renaming regression tests to be more explicit.

* Started as a typo-fix, ended up renaming regression tests to be more explicit.

* Removed space that I accidentally added before.

* Applied changes as requested by MichaelWest22.

---------

Co-authored-by: Matteo Smaila <matteo.smaila@314softwaresolutions.com>
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2025-07-14 17:37:40 -06:00
MichaelWest22
8e489ef6ee
fix click events on elements wrapped by link don't cancel link navigation (#3357)
fix click events on elements wrapped by link doesn't cancel link navigation
2025-06-27 07:33:28 -06:00
MichaelWest22
c9e2bea954
Fix Modified click trigger on form elements prevent default behaviour (#3336)
Fix Modified click trigger on form elements prevent default behaviour of clicked element
2025-06-16 18:09:32 -05:00
Carson Gross
fd775f84be fix version and lint 2024-01-23 12:53:58 -07:00
Carson Gross
1023193b01 fix script tag double execution 2024-01-23 12:48:39 -07:00
Alexander Petros
4b890ce72d Run linter on the tests too 2023-12-21 13:22:10 -05:00
Vincent
200c503f31
Removed IE-specific tests (#2039) 2023-11-24 11:30:11 -05:00
Vincent
55c30b5607
Make htmx IE11 compatible again + tests IE11 compatible (#1687)
* Make htmx IE11 compatible again + tests IE11 compatible

* IE11 compatible handmade socket mock for ws-ext tests

* Fallback when xpath isn't supported, hx-on wildcard now working on IE11

* Merge remote-tracking branch 'upstream/relative-url-in-hx-boost' into ie11-compatibility
2023-09-06 09:55:18 -06:00
Alexander Petros
fe4a803e2e
Add logNone function and apply it to tests (#1504)
New function to turn off the logger after using `logAll()`. I applied to
this to the tests as well so that `logAll()` is only used in the specfic
places where debug output is required. This makes the console output of
the tests dramatically more useful when run from the command line.
2023-06-24 14:21:55 -06:00
Ben Beecher
546fba2776
Hotfix for swapping fields that don't support setSelectionRange (#1187)
* Hotfix for swapping fields that don't support setSelectionRange

* Fix test
2023-01-04 08:54:38 -07:00
carson
c9e758f7ec add regression for https://github.com/bigskysoftware/htmx/issues/768 2022-01-14 15:26:02 -07:00
Matthew Molloy
e283e476b5 added regression test for image maps 2021-07-06 00:52:55 +09:00
carson
444660158f regression for hyperscript htmx:afterRequest form reset integration 2021-06-14 09:46:55 -06:00
carson
835436a99b Multiple trigger issue - fix https://github.com/bigskysoftware/htmx/issues/392 and https://github.com/bigskysoftware/htmx/issues/390
Mark handling by element, rather than by event
introduce `consume` keyword on trigger to allow for preventing it from bubbling to parent
2021-02-27 20:01:39 -07:00
carson
c773e86131 regression test for previous fix
move event cancellation before filtering so form submissions can be cancelled properly
2021-01-25 14:20:06 -07:00
carson
d26a09c5c7 fix name 2020-10-18 06:49:07 -06:00
carson
09712012c6 ensure that the new selected element exists 2020-09-27 15:52:31 -06:00
carson
499c54b846 ignore attributes w/ an @ in it 2020-09-13 22:27:24 -06:00
carson
7cc8f08377 regression test for @ name support in attributes (Alpine.js issue)
This passes, but apparently there is an outstanding issue.
2020-09-10 08:22:31 -06:00
Robert Ros
c6fe43adcd Add testcase for issue with id attributes with a dot. 2020-07-20 20:57:16 +02:00
carson
f9463686e0 switch to contain for safari 2020-06-17 15:15:17 -07:00
carson
19b933449b catch empty IDs in attribute swap, fixes https://github.com/bigskysoftware/htmx/issues/101 2020-06-16 19:20:23 -07:00
carson
efd3ab85f0 regression for https://github.com/bigskysoftware/htmx/issues/101 2020-06-16 16:46:19 -07:00
carson
468c405d02 fix https://github.com/bigskysoftware/htmx/issues/33 - include empty input values in request 2020-05-23 09:23:29 -07:00
carson
3aa8c64754 le big re-rename 2020-05-17 05:22:19 -07:00
carson
390ac2443b copy children collection so merging oob node doesn't screw up iteration
fixes https://github.com/bigskysoftware/kutty/issues/4
2020-05-16 06:54:33 -07:00
carson
36bd9a25ca event testing 2020-05-13 13:57:52 -07:00
carson
ba5cb7105a organize tests 2020-05-13 09:12:31 -07:00