3414 Commits

Author SHA1 Message Date
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
Carson Gross
7529444e86 fix shas v2.0.6 2025-06-27 07:46:10 -06:00
Carson Gross
a440c6d4f4 Merge branch 'master' into dev 2025-06-27 07:43:31 -06:00
Carson Gross
1b3e78c331 fix package-lock.json 2025-06-27 07:41:58 -06:00
Carson Gross
599d152c48 prep 2.0.6 release 2025-06-27 07:40:21 -06:00
Carson Gross
fe7f103eab prep 2.0.6 release 2025-06-27 07:39:35 -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
Carson Gross
17a7dd1fc4 Merge remote-tracking branch 'origin/master' 2025-06-25 15:15:58 -06:00
Carson Gross
17f417c923 remove 2.0 announcement 2025-06-25 15:15:48 -06:00
surfskidude
5df061fb65
Adding Lua Server Pages server example (#3347) 2025-06-25 10:17:24 -06:00
Carson Gross
c838cfb7a6 update docs 2025-06-20 15:46:42 -06:00
Carson Gross
726292af1d fix SHAs v2.0.5 2025-06-20 15:31:36 -06:00
Carson Gross
683c0e8ae2 prep 2.0.5 release 2025-06-20 15:29:01 -06:00
Carson Gross
4f95de2e58 prep 2.0.5 release 2025-06-20 15:21:29 -06:00
Simon Hartley
e2353e26bc
Allow use of "this" when evaluating hx-vals (#3332)
Evaluate hx-vals with "this" referring to the element it is defined on

Co-authored-by: scrhartley <scrhartley@github.com>
2025-06-20 14:52:17 -06:00
MichaelWest22
dc71b317d0
throw targetError correctly when target invalid during retarget (#3335)
* throw targetError correctly when target invalid during retarget

* fix missing jsdoc return
2025-06-20 14:51:12 -06:00
MichaelWest22
84306ccf3d
Fix non chrome view transtions tests (#3338)
fix non chrome view transitions tests
2025-06-19 15:02:11 -06:00
Carson Gross
3f49db3936 document inherit keyword 2025-06-19 11:21:49 -06:00
Carson Gross
bb4eb0f813 changelog for 2.0.5 release 2025-06-19 10:40:06 -06:00
Carson Gross
e38d6a7147 update sha 2025-06-19 10:24:57 -06:00
Carson Gross
1d01b94b90 prep v2.0.5 2025-06-19 10:24:09 -06:00
MichaelWest22
c091b95fa3
Move currentPathForHistory to session storage (#3330)
* Move currentPathForHistory to session storage

* update test

* fix more sessionStorage from localStorage
2025-06-16 18:24:39 -05: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
MichaelWest22
7388d0c057
Move History storage to sessionStorage (#3305)
* Move History storage to sessionStorage and history path to window

* Fix type warnings

* Revert currentPathForHistory to move it to its own PR

* fix test
2025-06-16 18:08:34 -05:00
MichaelWest22
508e332544
Standardize history restore functions to use proper htmx swap functions (#3306)
* Improve history support and events

* Improve history event overrides

* Improve history support and events

* Improve history event overrides

* Update Documentation of new event changes

* Add event testing for updated events

* update event doco and rename to historyElt to be consistent

* Improve history support and events

* Improve history event overrides

* Update Documentation of new event changes

* Add event testing for updated events

* update event doco and rename to historyElt to be consistent

* Fix loc coverage test coverage

* Standardize history restore functions to use proper htmx swap functions

* Add test for hx-history-elt attribute

* Fix broken merge conflict resolution
2025-06-16 16:53:57 -06:00
Simon Hartley
3c1ac71573
Follow up to #3234 (#3334)
* Follow up to #3234

Add missing part of migration from UNPKG to jsDelivr

* Restore UNPKG support in package.json

---------

Co-authored-by: scrhartley <scrhartley@github.com>
2025-06-16 16:37:26 -06:00
MichaelWest22
859708c379
move delay and view transitions to inside swap function for api and history use (#3328)
* move delay and view transitions to inside swap function

* Fix indenting and add tests

* move delay and view transitions to inside swap function

* Fix indenting and add tests

* revert rollback of feat: handle 'unset'for HX-Reselect in swap function
2025-06-16 17:31:07 -05:00
Sukka
7df5969664
Replace jsDelivr w/ UNPKG (#3234)
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2025-06-03 07:14:03 -06:00
Ryan Kilpadi
5b4d77da6b
Attach hx-on handlers before processing nodes (#3131) 2025-06-02 15:50:19 -05:00
Carson Gross
e7bb245ef4 fix bad strings, merge master, update package-lock.json 2025-06-02 11:54:49 -06:00
Carson Gross
0aaab5a3c9 Merge branch 'master' into dev
# Conflicts:
#	package-lock.json
#	package.json
2025-06-02 11:52:35 -06:00
Carson Gross
d1d0cd916b Merge remote-tracking branch 'origin/master' 2025-06-02 11:51:28 -06:00
Carson Gross
dd1914d503 update https://tacohiro.systems/ link 2025-06-02 11:51:21 -06:00
Carson Gross
e783c88670 move repeat logic on HX-Retarget header out to its own function. 2025-06-02 11:48:22 -06:00
Carson Gross
8ec48d9d29 Merge remote-tracking branch 'origin/dev' into dev 2025-06-02 11:47:55 -06:00
Piotr Tomiak
11ff1940f0
Automatically generate Web Types for the package based on current documentation (#3071) 2025-06-02 11:25:23 -06:00
ludicrousdisplay
28b31f23db
adding javalin-htmx examples to server integration examples (#3104)
* adding javalin-htmx examples to server integration examples

Adding two examples of using htmx with the javalin server library

* Update www/content/server-examples.md

Co-authored-by: Vincent <vichenzo-thebaud@hotmail.com>

---------

Co-authored-by: Vincent <vichenzo-thebaud@hotmail.com>
2025-06-02 11:21:38 -06:00
Vincent
53c5cf6df7
Remove obsolete npm command + fix links to ws/sse extensions (#3208)
Remove obsolete npm command + fix links to ws/SSE
2025-06-02 11:21:11 -06:00
Vincent
82546dbd47
Inherit list-keyword in hx-include / hx-indicator (#1766)
Inherit keyword in hx-include / hx-indicator
2025-06-02 11:20:24 -06:00
Jeremiah Johnson
4184d1fd0c
fix(swap): apply swap delay in swap function instead of handleAjaxResponse (#2845)
* fix(swap): apply swap delay in swap function instead of handleAjaxResponse

* add swap delay test
2025-06-02 11:19:11 -06:00
Oliver Haas
6d238f3d61
Feat/hx reselect support unset (#3153)
feat: handle 'unset'for HX-Reselect in swap function (+ test)
2025-06-02 11:01:20 -06:00
Simon Hartley
075ed73799
Fix target value in htmx:targetError when inheritance has been used (#3178)
Co-authored-by: scrhartley <scrhartley@github.com>
2025-06-02 10:58:31 -06:00
Carson Gross
70f41e0c6c Merge remote-tracking branch 'origin/dev' into dev 2025-06-02 10:57:57 -06:00
JacobMonticello
e4ecc55586
Typo in addEventListener - use evt instead of event (#3188)
Use evt instead of event

Co-authored-by: Jacob monticello <Jacob Monticello>
2025-06-02 10:57:46 -06:00
Gustavo Guzmán
11a8e9c6c2
Feature: add extensionsToIgnore to withExtensions (#3195)
feat: add extensionsToIgnore to withExtensions
2025-06-02 10:56:51 -06:00
Carson Gross
646c8583be Merge remote-tracking branch 'origin/dev' into dev 2025-06-02 10:56:11 -06:00
David Martiník
730bd8224d
Fixes issue 1537 - OOB does not escape query selector - updated version (#3304)
* Fixes issue 1537 - OOB does not escape query selector

* Adds test cases for oob swaps where the id contains special characters

* Updated oob multiple elements with the same ID test

* fix(issue-1537): resolved conflicts with master

* fix(issue-1537): fixed codestyle issues

---------

Co-authored-by: Fraser Chapman <fraser.chapman@gmail.com>
Co-authored-by: David Martiník <david.martinik@powerflow.cz>
2025-06-02 10:52:29 -06:00
Simon Hartley
8409ebca3b
Fix missing TypeScript property (#3315)
Add hidden elt property to HtmxRequestConfig

Co-authored-by: scrhartley <scrhartley@github.com>
2025-06-02 10:50:51 -06:00
MichaelWest22
083dbcdd6f
update web test-runner and remove temp summaryReporter workaournd (#3320)
* update web test-runner and remove temp summaryReporter workaournd

* Update error reporting to show in context of the test file and as a summary at the bottom
2025-05-22 07:17:16 +02:00
Simon Hartley
d2e39716fb
Fix type for event parameter (#3317)
Fix type of event for HtmxExtension.onEvent

Co-authored-by: scrhartley <scrhartley@github.com>
2025-05-19 07:40:36 +02:00