2538 Commits

Author SHA1 Message Date
Carson Gross
a59a10baad bump for next version 2023-11-16 16:52:11 -07:00
Carson Gross
ab8605714f Merge remote-tracking branch 'origin/dev' into dev 2023-11-16 16:50:16 -07:00
matiboy
c454ea4eee
Fix WS sendImmediately (#1949)
* Tests at current state of the code

* Currently failing case (actual issue)

* Fix issue

---------

Co-authored-by: mat <matt@techspace.asia>
2023-11-16 13:48:36 -07:00
michaelperel
68661753bd
fix indicator styles flash (#1227)
fix flash of indicator when first added to page
2023-11-16 13:46:29 -07:00
Jonathan Rietveld
7ef95e8963
Allow CSS selectors with whitespace in hx-trigger (#1913)
* Allow CSS selectors with whitespace in `hx-trigger`

Parsing of `hx-trigger` scans for whitespace, so if a CSS selector is used that contains whitespace, e.g. `form input`, a syntax error is raised.
A workaround is implemented by allowing such a CSS selector to be wrapped in either curly braces or parentheses.

* Add explanation whitespace in CSS selector to docs

* Tests for CSS selectors containing whitespace

* Use faster RegEx test, remove redundant variable declarations

* Added Descendant Combinator support to `root` and `target` modifiers

* Add missing semicolon

* Tests for descendant combinators in `root` and `target` modifiers

* Improve descendant combinator test coverage
2023-11-16 13:45:46 -07:00
gbourant
6a9a861ad9
Allow user to override Content-Type header (#1906)
* allow user to override Content-Type header

* reorder the code so it won't use userSetContentType variable

* remove userSetContentType

* clarification

* remove unrelated changes

---------

Co-authored-by: gbourant <root@gbourant.com>
2023-11-16 13:42:45 -07:00
Vincent
d7735ad645
Fix missing ignoreTitle property declaration in htmx.config (#1981)
* Fix missing ignoreTitle property declaration in htmx.config

* Add ignoreTitle to htmx.d.ts
2023-11-16 13:38:16 -07:00
Jacob Scott
cabff5db14
Add select option to htmx.ajax() (#1985)
adds select to ajax api
2023-11-16 13:37:38 -07:00
Sascha Woo
748dd0c246
Add config option scrollIntoViewOnBoost to typescript defs (#1986) 2023-11-16 13:36:51 -07:00
RBRi
31908e4839
Add missing '})' in core ajax tests (#1998) 2023-11-14 15:27:50 -05:00
Carson Gross
8c5e053377 add links to article 2023-11-08 13:31:19 -07:00
Carson Gross
616f7529d1 essay 2023-11-06 20:43:36 -07:00
Carson Gross
d1cb1acaa3 Merge remote-tracking branch 'origin/dev' into dev v1.9.8 2023-11-06 18:04:05 -07:00
Carson Gross
6fe62580e0 prep 1.9.8 release 2023-11-06 18:03:43 -07:00
Alexander Petros
37a864ea0f
Add new config options to typescript defs (#1970)
Fixed version of #1936
2023-11-06 17:55:18 -07:00
Vincent
563ce5d042
List extended selectors + caveats in hx-include doc (#1522)
List extended selectors + caveats in hx-include doc
2023-11-06 16:53:34 -05:00
Alexander Petros
2c2bf5679f
Remove type:module from package.json (#1968) 2023-11-06 19:00:37 +01:00
Vincent
df7c0c2c60
Fix www.sh, copy scripts to theme's static/js folder too (#1967) 2023-11-06 10:48:27 -07:00
Chase Fleming
c2e4b51495
Add htmx/elem-go server examples (#1961)
* Add htmx/elem-go server examples

* Move examples section

* Fix formatting

---------

Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
2023-11-05 15:24:26 -05:00
Carson Gross
ca108e4d79 Merge remote-tracking branch 'origin/master' 2023-11-03 20:55:57 -06:00
Carson Gross
c1b4101def re-prep 1.9.7 release v1.9.7 2023-11-03 20:53:16 -06:00
Tom
8ca51e078a
Added a server example link to "How to create a Django form (using HTMX) in 90 seconds 🐎" (#1938)
* Added a Django + HTMX forms link 

- Added a Django server example link to "How to create a Django form (using HTMX) in 90 seconds 🐎".
- This article has received over 10k views and positive comments so far. I wrote the article; I would have benefitted from seeing it when I was first learning to use HTMX.

* Update server-examples.md

Appended to the list as requested
2023-11-03 15:36:51 -04:00
Sascha Woo
f2d776c151
Add config option to disable scroll into view for targets of boosted links and forms (#1459)
Thank you @xhaggi
2023-11-03 13:42:20 -05:00
Carson Gross
61dac7d933 prep 1.9.7 release 2023-11-02 16:43:18 -06:00
Vincent
8ddd079b90
IE11 compatibility fixes (#1948) 2023-11-02 16:40:33 -06:00
Carson Gross
3912e3c2c2 prep 1.9.7 release 2023-11-02 15:28:53 -06:00
Carson Gross
5cd5f927ba Merge branch 'master' into dev 2023-11-02 15:12:37 -06:00
joseph-d
a2830aa2df
Update template-fragments.md (#1942)
Added a link to Laravel Blade's implementation of template fragments
2023-11-01 22:29:06 -04:00
Eric Kwoka
bdcb040a2f
Fix stale form references (#1820)
* 🐛 ensures form reference is accurate

*  Adds test

* 🐛 Fixes null checks

* Revert www updates

This reverts commit d2d14056e2635688fdcb0e6abe572034f77c0bef.

* Revert www updates

This reverts commit 3de585e02997a7877f47ef84f6c2f1a5fcc91ac3.

* ♻️ Refactors code

*  Passes tests
2023-10-31 16:32:58 -06:00
Sam Cook
225d8d8cac
Add missing config settings to type declarations in dist/htmx.d.ts (#1936)
Add missing config settings to type declarations in dist/htmx.d.ts
2023-10-31 16:25:08 -06:00
phpfan72
3540283347
Add hx-target-error attribute to response-targets extension (#1929)
* Update response-targets.js

Add hx-target-error logic

* Update response-targets.md

add documentation and fix typo
2023-10-31 16:24:43 -06:00
Oli
ff45076a24
Clear cache when historyCacheSize is set to 0 (#1222)
* Update htmx.js

* Purge history cache early if it should not exist

---------

Co-authored-by: Alexander Oliver Mader <AlexanderOliver.Mader@bosch.com>
2023-10-26 15:01:58 -06:00
Raphaël Piccolin
fdd2570ac8
fix: prevent nodeData.onHandlers overwrite (#1894)
* fix: prevent nodeData.onHandlers() overwrite

* fix: improved type safety

* test: hx-on handler cleanup

* style: wording

* chore: extra line
2023-10-26 14:45:46 -06:00
matiboy
712ee759f1
Fix confirmed being ignored in htmx:confirm event (#1610)
* Current behavior testing

Testing current library behavior

* Test should remove correct handler

* Add question in htmx:confirm event detail

* Allow skipping window.confirm

* Additional test without hx-confirm value

* Wrap htmx.off in finally

* More correct assertion in case of no calls to confirm

* Remove erroneously added formatting

* Remove erroneously added formatting

* Documentation, fix loop

---------

Co-authored-by: mat <matt@techspace.asia>
2023-10-26 14:43:41 -06:00
Jyri-Matti Lähteenmäki
1040ace093
Fix: Use getElementById instead of querySelector to work with all valid characters (#1902)
responseInfo.pathInfo.anchor is assumed to be an ID here, so use getElementById instead of querySelector, which doesn't accept all valid characters (for example parentheses)
2023-10-26 12:00:00 -06:00
Denis Palashevskii
a679244c40
Fix websocket polling trigger (#1903)
fix websocket polling trigger
2023-10-26 11:54:24 -06:00
EliasPrescott
0718daa3ac
Fix: form submission of email inputs with multiple attribute (#1917)
fixing multiple email input values
2023-10-26 11:53:58 -06:00
Ricky Tobing
c7f9dcb682
Documentation - Added link to https://javascript.info/keyboard-events (#1919) 2023-10-24 12:40:40 -04:00
Jason Jōb
142b711903
Fixed ws and sse references in the docs (#1908)
fixed ws and sse references in the docs
2023-10-20 13:32:40 -04:00
Ricky Tobing
3849854f25
Fixed indentation/rendering in Modal bootstrap example page (#1907)
Fixed indentation (tab vs space)
2023-10-20 11:53:43 +02:00
Daniele Teti
b2b3c8f5e0
Added DelphiMVCFramework sample (#1893) 2023-10-13 18:44:44 -04:00
Alexander Petros
d26fe4709d
Remove the last of the go code (#1890)
Update the website tests with the latest tests on master, deleting the
mirrored go code in the process.
2023-10-12 16:01:34 -06:00
Alexander Petros
a66a98b9ed
Fix WS/SSE tests and replace go backend with NodeJS (#1876)
* Write WS and SSE test backend in node

* Refactor pages so that the URLs work

* Add tab highlighting script

* Fix stream with multiple events

* Fix highlighting on ext links

* Refactor WS code

* Support event trigger tests

* Add some jitter to the intervals

* Delete old go backend

* Update README with new info and credits

* Update top-level README

* Move ws to dev dependencies

* Remove extraneous go server

* Fix misplace comment
2023-10-12 15:54:40 -05:00
Mohamed Haddi
f0ad4690d0
Sortable example fixes (#1868)
* add missing quotation mark

* make `.htmx-indicator` unsortable

* change cursors to indicate grabbable items

* bug fix:

bug:
when an item is dragged fast enough before the previous request was
completed, dropping after request completion resulted in the addition
of an extra item to the list.

fix:
disable sortable on End event, and re-enable it on htmx:afterSwap.

* add a few inline  comments + better naming
2023-10-09 17:28:49 -04:00
Vincent
7274454360
[New feature] selector-less next and previous targets (#1478)
* nextElementSibling and previousElementSibling target selectors

* Renamed nextElementSibling => next, previousElementSibling => previous
2023-10-06 22:25:03 -06:00
Sascha Woo
4f63581c55
Add new event htmx:beforeHistoryUpdate (#1573)
* Add missing documentation for htmx:replacedInHistory

* Add new event htmx:beforeHistoryUpdate
2023-10-06 22:22:44 -06:00
Vincent
332e8986ac
Clear lastButtonClicked ref if it was removed from the DOM (#1785)
Fix #1749 clear lastButtonClicked ref if it was removed from the DOM
2023-10-06 22:13:15 -06:00
André Rouél
76e0ca1216
Fix Handlebars template rendering (#1836)
Fix Handlebars template rendering (see #801 and #1801)

Co-authored-by: russ4stall <russ@slashpine.tech>
2023-10-06 22:04:58 -06:00
Sam Dudley
355a4fad65
Ignore formmethod when value is "dialog" (#1867)
Fixes #1866
2023-10-06 22:04:02 -06:00
Thomas de Queiroz Barros
590fddaf04
Improve request/response documentation in docs.md (#1839)
* docs+reference: merge Response Headers docs

* docs+reference: merge Request Headers docs

* docs+reference: use true as strings
2023-10-03 16:06:29 -04:00