Carson Gross
fb78106dc6
prep next release
2024-12-12 13:12:49 -07:00
Geoffrey B. Eisenbarth
cc2466b1f8
Cancel vanilla submits from <button[form]/>. ( #3072 )
2024-12-12 13:09:26 -07:00
Vincent
a331244923
Support multiple extended selectors for hx-include, hx-trigger from, and hx-disabled-elt ( #2902 )
...
* Initial suggestion (squashed)
Support multiple extended selectors for hx-include
Additional test for nested standard selector
Add @MichaelWest22 hx-disabled-elt multiple selector test
Add hx-trigger `from` test with multiple extended selectors
Simplify
Include #2915 fix
Update htmx.js
Split for readability
Don't apply global to previous selectors
Rewrite loop, restore global recursive call, minimize diff
Use break for better readability
Co-Authored-By: MichaelWest22 <12867972+MichaelWest22@users.noreply.github.com>
* Keep global as a first-position-only keyword
* Wrapped selector syntax
* Replace substring check by individual chars check
* Fix format
---------
Co-authored-by: MichaelWest22 <12867972+MichaelWest22@users.noreply.github.com>
2024-12-12 11:12:01 -07:00
Carson Gross
232667d2c6
fix https://github.com/bigskysoftware/htmx/issues/1788
...
boosted forms that issue a `GET` (and only a `GET`) and have no `action` attribute or an empty `action` attribute should clear the existing parameters of the current path when submitting lmao
2024-12-11 16:42:20 -07:00
Simon Hartley
704dac7a7f
Replace deprecated String.prototype.substr usage ( #2951 )
...
Co-authored-by: shartley <scrhartley@github.com>
2024-12-11 14:28:09 -07:00
basvk
34dda10f9e
Do not execute hx-trigger="load" on re-initialization of an existing node ( #2976 )
...
* Do not execute hx-trigger="load" on re-initialization of an existing node
* simplify initNode firstInit logic
2024-12-11 14:27:34 -07:00
Alexander Petros
bd35f64cf7
Add missing htmx:trigger event on load triggers ( #3033 )
2024-12-11 14:20:12 -07:00
Alexander Petros
5ab508f652
Make bodyContains return true for nested shadow roots ( #3034 )
...
This fixes an issues in which `bodyContains()` would incorrectly return
false for nested shadow roots.
2024-12-11 14:17:32 -07:00
MichaelWest22
c24fb71a10
Handle Invalid template content ( #3064 )
2024-12-11 14:16:20 -07:00
Paul Garner
bc7ea4a8d9
typing for defineExtension
should allow partials ( #3030 )
2024-11-22 11:03:42 +01:00
Simon Hartley
62969122f1
Fix illegal invocation for FormData proxy ( #2997 )
...
Fix illegal invocation for a FormData proxy returning a function looked-up via a symbol
Co-authored-by: shartley <scrhartley@github.com>
2024-11-07 10:15:07 -07:00
MichaelWest22
816fe6d161
ajax helper with no source or target defaults to body ( #2948 )
2024-10-20 16:38:41 -06:00
youssame
3e265ea263
Fix TypeError on null path variable ( #2967 )
...
* Fix the error
* add tests
2024-10-20 16:37:58 -06:00
MichaelWest22
033d295ef9
fix es6 tsc checks complaining on newer s regex flag ( #2938 )
2024-10-02 22:05:40 -06:00
Carson Gross
56f801f69d
release prep
2024-10-02 21:09:37 -06:00
Carson Gross
d9b4ada06b
release prep
2024-10-02 20:19:43 -06:00
MichaelWest22
958fef20d9
Add shadowRoot host selector ( #2866 )
2024-10-02 19:46:11 -06:00
Jonathan
99285cd5c3
fix for hx-swab-oob within web components ( #2846 )
...
* Failing test for oob-swap within web components
* hx-swap-oob respects shadow roots
* Lint and type fixes
* fix jsdoc types for rootNode parameter
* Fix for linter issue I was confused about before
* oob swaps handle global correctly
* swap uses contextElement if available, document if not
Previous a commit made swapOptions.contextElement a required field. This
could have harmful ramifications for extensions and users, so instead,
the old behavior of assuming document as a root will be used if the
contextElement is not provided.
* rootNode parameter is optional in oobSwap
If not provided, it will fall back to using document as rootNode. jsdocs
have been updated for oobSwap and findAndSwapElements accordingly.
2024-10-02 19:44:41 -06:00
Nathan
8c6582679b
Better graceful degradation of boosted form element ( #2802 )
...
* better graceful degradation of form elt
* smaller
* move fix and add tests
2024-10-02 19:44:13 -06:00
aeccue
c24adef38f
[FIX] Properly remove request indicators ( #2860 )
...
Deduct request count before removing request indicators
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2024-10-02 19:43:19 -06:00
MichaelWest22
0e1eeec8b4
remove extra hx-swap-oob attribute that is not used in the page ( #2823 )
...
remove extra hx-swap-oob tag that is not used in the page
2024-10-02 19:40:54 -06:00
Eric Kwoka
b23b2f034e
🐛 Prevents erroring on null vals ( #2799 )
...
* 🐛 Prevents erroring on null vals
* 🚧 Applies same fix in FormProxy
* 🧪 Adds Test for null in FormDataProxy
2024-10-02 19:21:02 -06:00
MichaelWest22
5b550e5c49
Optimize Head regex ( #2781 )
...
* remove shared tag regex utility function that is no longer really needed
* fix head-support manual test to point to externally hosted extension
* minimize regex
2024-10-02 19:20:23 -06:00
MichaelWest22
b98e4f2b12
fix htmx.ajax defaulting to swap body when target not found ( #2878 )
...
* ajax helper handle no target
* allow source only targeting
* Add tests
* Handle source set but invalid target set
* Improve source logic
* missed #
* improve readiblity and add inline comment
2024-10-02 19:18:22 -06:00
Joerg Sonnenberger
df92b295d6
Change hx-trigger's changed modifier to work for independent trigger specifications ( #2891 )
...
* Adjust hx-trigger's changed modifier for multiple sources
The `changed` trigger modifier can see different event targets, either due
to the `from` modifier or event bubbling. The existing behavior trigger
only for one node (`from` modifier) or inconsistently (bubbling).
Use a nested weak map to keep track of the last value per distinguished
(trigger specification, event target node) pair. The weak map ensures
that Garbage Collection can still recycle the nodes.
If a event target was not seen via `from`, it is assumed changed for the
first time the trigger is hit.
* Add test case for separate triggers with changed modifier
2024-10-02 19:17:25 -06:00
Jackie Li
4916ce4d02
fix #2932 : check parent is null for swap delete ( #2933 )
...
* fix #2932 : check parent is null for swap
* fix test in swap when parent elt deleted
2024-10-02 19:08:39 -06:00
MichaelWest22
4a8172325e
enable hx-preserve handing for oob swaps ( #2934 )
...
* Add support for oob swaps with hx-preserve
* Add tests
* Documentation
* Impove fix to handle when oob swaps shouldSwap set false
2024-10-02 19:02:46 -06:00
MichaelWest22
d528c9d94d
Handle Space before comma in Trigger Spec ( #2903 )
...
* strip space after trigger spec
* Add test
* handle addiional case
2024-09-25 13:12:37 -06:00
MichaelWest22
3d1a2e5202
[bug] load trigger stops hx-disabled-elt getting re-enabled ( #2925 )
...
* allow disable-elt on load to function
* Update requestCount fallback
2024-09-25 12:13:25 -06:00
Alexander Kulikov
324ee19377
Listen to resize events and check revealed ( #2780 )
2024-08-29 12:01:13 -06:00
Carson Gross
2855c2c24e
merge https://github.com/bigskysoftware/htmx/pull/2723
2024-08-29 12:00:00 -06:00
Ben Croker
cd6cdb275e
Ability to add options
argument to event listener ( #2836 )
...
* Update htmx.js
* Update events.js
* Add fallback value
* Use JSDoc syntax
* Document parameter
* Only accept an object
* Revert change
* Add useCapture
* Update htmx.js
* Add `useCapture` test
* Clean up
* Revert addition of test
2024-08-29 10:36:24 -06:00
MichaelWest22
bc4468ddcd
fix restoreHistory title replacment ( #2841 )
...
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2024-08-29 10:32:49 -06:00
MichaelWest22
2ba7fd280e
Upgrade Typescript to move configuration from const to let ( #2853 )
...
* typescript upgrade v5.5.4
* fix dist
2024-08-29 10:30:51 -06:00
Carson Gross
0fd854758c
fix formatting
2024-08-27 07:47:01 -06:00
Carson Gross
b4048ebb59
add moveBefore
support
2024-08-23 15:20:01 -06:00
Carson Gross
97b8c68dd3
release prep
2024-08-05 13:53:08 -06:00
Carson Gross
b1d6135dca
add htmx:trigger
for throttled events too
2024-08-05 13:48:37 -06:00
Kyungmin Bae
27412551a5
fix: Fire htmx:trigger event on delayed triggers ( #2411 )
...
* Add test on htmx:trigger for delayed triggers
* Fire htmx:trigger event on delayed triggers
2024-08-05 13:47:58 -06:00
Carson Gross
df3fd8fe28
Merge remote-tracking branch 'origin/dev' into dev
2024-08-05 13:46:28 -06:00
Carson Gross
42343d9194
Merge branch 'master' into dev
2024-08-05 13:41:37 -06:00
pokonski
ee9b0e0390
Do not boost forms with method="dialog" ( #2752 )
...
* Do not boost forms with method="dialog"
* Clean up
2024-08-05 13:38:51 -06:00
Vincent
941e94fb98
Fix file upload through htmx.ajax ( #2778 )
...
* Fix File values handling in formDataFromObject
Fixes #2630
* Test file input upload + htmx.ajax file upload
2024-08-05 13:38:21 -06:00
Carson Gross
084df38c31
only removed templates explicitly used for encapsulating oob swaps
...
fixes https://github.com/bigskysoftware/htmx/issues/2776
2024-08-05 13:37:31 -06:00
Carson Gross
89dc9bea2e
Merge remote-tracking branch 'origin/dev' into dev
2024-08-05 13:12:22 -06:00
Carson Gross
0ace4a731c
scan through all siblings (not just until the first non-element) when doing an outerHTML swap to add things to settle
...
fixes https://github.com/bigskysoftware/htmx/issues/2787
2024-08-05 13:12:13 -06:00
Carson Gross
df16ed8e96
manual test for keeping indicators visible
2024-08-05 12:29:33 -06:00
Carson Gross
a575ad20f0
use attributes rather than request count since we are working on a clone of the original DOM
2024-08-01 13:44:31 -06:00
Carson Gross
115f2cf210
remove disabled
attributes from anything disabled due to an htmx request when snapshotting for history
2024-08-01 12:59:42 -06:00
Carson Gross
116c8619d5
allow response actions (such as full page refreshes) to retain htmx indicators during the response handling
2024-08-01 12:56:24 -06:00