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
Kian Yang Lee
f0964d2d08
docs: migrate realtime server implementation ( #2955 )
...
Removes the realtime server for testing WebSockets and Server Sent
Events (SSE) in htmx to the extension repository, as mentioned in issue #2944 .
2024-10-13 10:09:32 +02:00
Carson Gross
1c4d378d03
fix formatting
2024-10-02 20:11:29 -06:00
Carson Gross
c7278c448e
fix test (firefox, safari)
2024-10-02 20:09:11 -06:00
Carson Gross
1537833ae0
Merge remote-tracking branch 'origin/dev' into dev
2024-10-02 19:58:30 -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
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
Carson Gross
b8c92b8071
Merge branch 'master' into dev
2024-09-25 12:07:51 -06:00
shouya
e6a2ea15a2
Documentation for dynamic hx-vals ( #2898 )
...
* add test for spread operator in hx-vals
* update documentation
Closes #2885
2024-09-13 10:19:21 +02:00
Vincent
326ff3b296
Fix focusin-based tests ( #2861 )
2024-09-01 14:22:04 -04: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
Carson Gross
b4048ebb59
add moveBefore
support
2024-08-23 15:20:01 -06:00
ehenighan
27fc37ce50
Issue #2676 - Tests for v2 to prevent regression of issue from v1 ( #2829 )
...
* Tests for v2 to prevent regression of issue from v1
* Linting
---------
Co-authored-by: Ed Henighan <ed.henighan@adi-uk.com>
2024-08-19 21:09:42 +02:00
Carson Gross
97b8c68dd3
release prep
2024-08-05 13:53:08 -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
e99d8976f5
Manual test to ensure disabled elements are scrubbed when saving history
2024-08-05 12:22:51 -06:00
Ben Croker
a44a1b3c34
Add ability to trigger an event on another element using HX-Trigger
response header ( #2768 )
...
* Update htmx.js
* Update htmx.js
* Update headers.js
* Update htmx.js
* Update htmx.js
* Update htmx.js
* Update hx-trigger.md
2024-07-29 10:33:24 -06:00
Igor Berlenko
49b5dae073
fixed typo in hx-trigger.js ( #2728 )
...
Update hx-trigger.js
2024-07-26 00:27:22 -04:00
Vincent
bec3657a81
Fix: values order with non-GET requests ( #2749 )
...
Fix values order with non-GET requests #2703
2024-07-26 00:22:59 -04:00
Carson Gross
f3ae976aa2
fix outerHTML body swapping issue
...
fixes https://github.com/bigskysoftware/htmx/issues/2639
2024-06-18 10:28:53 -06:00
Carson Gross
1e07206ed2
ignore empty files
2024-05-22 14:53:29 -06:00
Carson Gross
8928efc40a
restore tests and dynamic hx-on behavior
2024-05-16 14:16:43 -06:00
Carson Gross
20b42aaf88
Merge branch 'master' into dev
...
# Conflicts:
# src/htmx.d.ts
# src/htmx.js
# test/core/security.js
# www/content/docs.md
2024-05-16 12:50:13 -06:00
Denis Palashevskii
dc93911566
Add tests for getSelectors method for extension registration ( #2508 )
...
add tests for getSelectors method for extension registration
2024-04-25 13:45:33 -06:00
Carson Gross
b991f20c3a
make hx-on respect the hx-disable attribute
2024-04-25 09:49:50 -06:00
Carson Gross
2be7054525
lint
2024-04-17 05:45:40 -06:00
Carson Gross
01cb5e0d8d
support hx-on in shadowroot
2024-04-17 05:25:28 -06:00
Carson Gross
ab4e9deabc
remove manual tests for extensions
2024-03-26 15:56:40 -06:00
Carson Gross
cd4e6c62cf
clean up bad IE references
2024-03-24 14:39:19 -06:00
Carson Gross
d92f165923
lint
2024-03-21 17:35:17 -06:00