576 Commits

Author SHA1 Message Date
Carson Gross
e8014bdce0 update hash algorithm to something a bit more standard 2022-10-06 10:24:38 -06:00
Carson Gross
cab3e352eb Merge remote-tracking branch 'origin/dev' into dev 2022-10-02 16:43:12 -06:00
Carson Gross
c1bf3fa686 keep a count on indicators so we only hide when no requests are in flight 2022-10-02 16:43:00 -06:00
Carson Gross
35d5fc8086 Merge branch 'feature_update_on_attribute_changes' into dev
# Conflicts:
#	CHANGELOG.md
#	www/essays/hypermedia-driven-applications.md
#	www/reference.md
2022-10-02 16:29:10 -06:00
Carson Gross
ac38a1a735 ignore empty attributes when computing attribute hash 2022-10-02 13:56:41 -06:00
Carson Gross
1dbb22b682 allow re-initialization if attributes change 2022-10-02 13:17:23 -06:00
Ben Lenton
c3662ce00d
Allow 'unset' directive for hx-vals and hx-vars (#1013)
* Allow 'unset' directive for hx-vals and hx-vars

* PR feedback

Co-authored-by: Ben Lenton <benlenton@Bens-MacBook-Air.local>
2022-09-30 14:08:46 -06:00
Leif Foged
3c6b5996a1
Properly set title during history cache miss (#1014)
I am running HTMX with hx-boost and the history cache disabled (it's important to not show stale content to my users unless my backend uses cache-control headers to do so, in which case I simply rely on the fetch being cached). However, during 'history cache misses', the page title is not properly set.

This fixes it (mirroring the logic in `handleAjaxResponse`).
2022-09-30 14:07:56 -06:00
Carson Gross
4d1164c8e0 support the hx-validate attribute, when set to true an individual input will validate itself. 2022-08-23 19:04:46 -06:00
Mehdi Achour
9f7c80a655
fix extended attribute form for hx-ext in findElementsToProcess (#999)
Closes #992
2022-08-10 12:14:20 -06:00
Carson Gross
1aafebb0da 1.8 release prep 2022-07-11 18:18:40 -06:00
Carson Gross
892173c355 fix tests 2022-07-11 16:29:40 -06:00
Carson Gross
207889f283 fix tests 2022-07-11 16:16:33 -06:00
Carson Gross
de78dc0070 small improvement 2022-07-11 13:40:15 -06:00
Carson Gross
7e7a5b4361 fix https://github.com/bigskysoftware/htmx/issues/827
keep local URL anchors along for the magical ride into the history API, and scroll to the target directly to avoid adding a junk history entry along the way

have i mentioned that I hate the javascript history API?
2022-07-11 13:34:40 -06:00
Carson Gross
8b9585f439 flip revealed to be a normal event
this fixes an ugly bug introduced when the trigger logic was pulled out, where the handler of the first revealed element was used over and over again for any future elements that also were revealed.  many braincells lost mmm.
2022-07-08 13:54:25 -06:00
Carson Gross
977ef65c90 Merge remote-tracking branch 'origin/dev' into dev 2022-06-29 16:04:50 -06:00
Carson Gross
8c574d767f push url for boosted forms 2022-06-29 16:04:42 -06:00
mayowa
9eef783011
Implement HX-Reswap (#949)
* Document optional delay parameter for addClass, removeClass, remove

* Implement HX-Reswap (resolves #933)
2022-06-29 15:37:28 -06:00
Carson Gross
87e69fcd69 introduce hx-replace-url
fixes https://github.com/bigskysoftware/htmx/issues/436
2022-06-16 13:22:48 -06:00
Carson Gross
8e7a4bca27 Merge remote-tracking branch 'origin/dev' into dev 2022-05-31 13:30:42 -06:00
Carson Gross
05619c5bec support the hx-select-oob attribute 2022-05-31 13:30:34 -06:00
Ben Beecher
d51d8cb74c
Adding support for client side redirects - HX-Location (#832)
* Adding support for client side boosted redirects

* First pass at hx-boost-redirect

* Fixing some small documentation issues

* Rename boost-redirect to Location
2022-05-27 11:39:23 -06:00
Denis Palashevskii
8bb0399052 Improvements in WebSocket extension
* Implement proper `hx-trigger` support
* Expose trigger handling API to extensions
* Implement safe message sending with sending queue
* Fix `ws-send` attributes connecting in new elements
* Fix OOB swapping of multiple elements in response
2022-05-14 21:19:28 +04:00
Carson Gross
742f05b9bd support filters on load event
fixes https://github.com/bigskysoftware/htmx/issues/752
2022-05-13 08:44:41 -06:00
Carson Gross
3f4b7bfb93 boost anchors w/a _self target
fixes https://github.com/bigskysoftware/htmx/issues/817
2022-05-13 08:29:08 -06:00
Carson Gross
8290da624b support next and previous (taken from hyperscript) in target expressions
fixes https://github.com/bigskysoftware/htmx/issues/814
2022-05-13 08:14:38 -06:00
Carson Gross
b735c291df support 'm' for minutes
fixes https://github.com/bigskysoftware/htmx/issues/807
2022-05-13 07:55:59 -06:00
Carson Gross
7ee07bb96f fix https://github.com/bigskysoftware/htmx/issues/908
respect the `enctype` attribute on form elements when submitting requests
2022-05-12 18:05:35 -06:00
David Guillot
15eea5577c
Check for localStorage availability (#872)
* feat(utilities): check localStorage availability

* fix(history): don't try to cache if no access to localStorage
2022-05-12 16:47:28 -06:00
Ben Beecher
4b5052984b
Attempts to fix case when htmx is loaded multiple times into browser (#883) 2022-05-12 16:44:34 -06:00
Ben Pate
eafd316d5f BUGFIX: API call to shouldCancel
This addresses problems using the WebSocket extension to send messages to a websocket server.  We were calling `shouldCancel` with the incorrect API signature, causing it to return FALSE (as in, don't cancel the event) when it should have returned TRUE (as in, yes, cancel the event)

I don't know why this worked in my tests before, but the test case it behaving correctly now.
2022-05-04 13:24:28 -06:00
David Guillot
be85c2c191
feat(ext): add disable-element extension (#869)
* feat(ext): add disable-element extension

* fixup! feat(ext): add disable-element extension
2022-04-08 13:13:03 -06:00
carson
0e69b6d064 Merge remote-tracking branch 'origin/dev' into dev 2022-04-07 13:50:07 -06:00
carson
74f520cf8b bump for next version of htmx 2022-04-07 13:49:57 -06:00
Denis Palashevskii
70b4ad16f0
Add data-loading-aria-busy directive for loading-states extension (#864)
* Add data-loading-aria-busy directive for loading-states extension; add tests for the extension

* Update docs

* Fix tests of scoped loading states

* Commit test files

* Improve delay tests by using sinon timer

* Add reference to MDN about `aria-busy` attribute
2022-04-07 13:34:41 -06:00
carson
15ed75e627 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	package-lock.json
2022-02-22 06:22:11 -07:00
Iustinian Olaru
0fd917119b
Added selector for input of type button (#836)
Co-authored-by: Iustinian Olaru <iou@ramboll.dk>
2022-02-18 11:43:50 -07:00
Ben Beecher
5670e064f2
Slightly more descriptive function name (#831) 2022-02-18 11:41:56 -07:00
Alejandro Schmeichler
8d6a7e05ad
Fix focus scroll page jumps using new htmx config.defaultFocusScroll setting. (#806)
* Add global config `scrollOnFocus`

* Change global to `defaultFocusScroll` and add new swap `focus-scroll` modifier

`focus-scroll` modifier accepts "true" and "false" values.

* Rename variables

* Code cleanup
2022-02-17 06:25:18 -07:00
mayowa
bda02d0d66
Document optional delay parameter for addClass, removeClass, remove (#820)
thank you!
2022-02-17 06:16:35 -07:00
Adam Boaler
f302ad6fdd
Skip validation if form submit button has formnovalidate attribute (#826)
awesome, thank you for adding a test too!
2022-02-17 06:15:23 -07:00
carson
faec23002c Merge remote-tracking branch 'origin/dev' into dev 2022-02-16 19:21:03 -07:00
carson
5cb4b4dd16 move title update after pushUrlIntoHistory()
fixes https://github.com/bigskysoftware/htmx/issues/746
2022-02-16 19:20:55 -07:00
Alejandro Schmeichler
c50b96129e
Add loading-states extension (#805)
* Add loading-states extension

* Add extension to the extensions list

* Remove duplicate reference to client-side-templates

* Remove duplicate entry to debug

How did this happen?!
2022-02-12 11:13:30 -07:00
Ben Pate
546e346e98
Restore hx-ws and hx-sse tags (#811)
absolute 👑 

* Restore WS and SSE code

First pass at restoring removed ws and sse code.  More to come.

* More progress on WS and SSE restore

* Update htmx.js

crucial whitespace

* Update documentation

* Combine SSE and WS servers into single "realtime" demo

* Realtime Test Server Updates

- separated tests for old- and new- style calling
- updated intro content and stylesheet
- removed extensions from manual test suite

* Remove SSE/WS from manual tests
2022-02-12 11:11:30 -07:00
carson
932c7d5f61 clean up this resolving for attributes 2022-02-05 17:00:01 -07:00
carson
ce260beb65 enable legacy web socket usage 2022-02-04 19:37:08 -07:00
carson
baa84e7803 get old sse syntax working 2022-02-04 19:16:13 -07:00
carson
05bb5719d0 var fix 2022-02-04 17:29:49 -07:00