58 Commits

Author SHA1 Message Date
Yawar Amin
271a3869c5
Render toast as aria-live region on page load (#3112)
* Render toast as aria-live region on page load

This tells the screen reader to announce updates that happen inside the
`span#toast` element.

* Update code sample in example text

* Use <output> element to announce form action
2025-01-07 23:33:03 -05:00
Ryan Kilpadi
5f3cb583ab
Add example for form reset pattern (#3100) 2025-01-07 09:49:40 +01:00
Yawar Amin
fb3b6a13a7
Docs anchors (#3047)
* Fix anchor id for 'Configuring Response Handling Examples' header

* Move heading anchor links to right of heading

To make sure they don't get cut off by weird browsers.

Also make the anchor link text the 'link' emoji which is more fun than
the hashtag.

* Keep anchor links on the left

* Make entire header the anchor link and show link emoji on hover

* Fix anchor link colour in dark mode

* Revert anchor link icon to hash character

---------

Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2024-12-23 09:41:47 -07:00
Matt544
1814f99023
Add reference to hx-preserve to the example at "Preserving File Inputs after Form Errors" (#2474)
* Add reference to hx-preserve to file-upload-input.md

* Address review feedback: add more description behaviour when using .
2024-12-18 21:09:45 +01:00
MikeMoolenaar
eff9a0ba25
Improve active-search example by not using chrome-only event "search" (#2229)
* Improve active-search documenation by not using chrome-only type 'search' input

* Fix typo

* Restore input type to search
2024-12-16 10:25:02 +01:00
Carson Gross
dba0fcf7e6 update video 2024-11-14 15:32:00 -07:00
Rob Zimmerman
d39a598e0b
Fixing a typo in confirm.md (#2988)
`evt` is not the correct variable name here - it should be `e`.
2024-10-31 10:18:01 +01:00
Carson Gross
defcf160d8 add moveBefore() demo 2024-10-04 13:15:07 -06:00
Carson Gross
b19e2f7dab add moveBefore() demo 2024-10-04 13:04:58 -06:00
Carson Gross
56f801f69d release prep 2024-10-02 21:09:37 -06:00
Luis Eduardo
27b5bcc438
Improved documentation for htmx:confirm event and examples for implementing sweetalert (#2926)
* Add detail.question and detail.issueRequest(skipConfirmation=false) documentation to htmx:confirm event

* Update htmx:confirm event documentation

* Update htmx:confirm event documentation

* Update htmx:confirm event documentation

* Modify htmx:confirm event documentation
2024-09-25 09:39:28 +02:00
Aaron Cunningham
2472bcab98
Update lazy-load.md (#2826)
fixed double-spacing issue in example
2024-08-19 22:29:06 +02:00
Saman Shahbazi
de98c40271
Fix typo in update-other-content.md (#2809)
fix typo
2024-08-11 10:27:50 +02:00
Jonas Högman
45d4bec43f
Fix typo in update-other-content.md (#2783)
Co-authored-by: Jonas Hogman <jonas.hogman@seb.se>
2024-08-01 11:27:06 +02:00
Ronald Cantillo
1136d26353
fix: example buttons in darkmode (#2719) 2024-07-13 09:17:59 +02:00
Walt Chen
a1915882c9
docs: fix incorrect payload in update-other-content oob page (#2604) 2024-06-18 11:48:22 -06:00
pokonski
f27e3495bd
Dark mode fixes (#2634)
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2024-06-18 11:44:45 -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
Viktor Szépe
31a0416368
Fix double-encoded UTF-8 characters (#2371)
* Fix double-encoded UTF-8 characters

* fix city name in active-search.md

https://en.wikipedia.org/wiki/Str%C3%A9e
2024-05-15 12:20:18 -06:00
Lloyd Lobo
b176784f31
docs: fix this binding in onClick .then handler with arrow function (#2373)
docs: fix `this` binding in onClick .then handler with arrow fn

 Update the `.then()` handler in the `onClick` attribute to use an arrow function instead of a traditional `function(arg)` expression. 

This fixes the `this` binding within the lexical scope, ensuring that `this` is bound to the `button` instead of the `window` and resolving the issue.

Fixes/Closes issue  #2257
2024-04-25 12:47:21 -04:00
Nico Ekkart
af50cde104
docs: aria-selected true in Tabs HATEOS example (#2404)
The `aria-selected` attribute should be set to true in the first tab for consistency with the class `selected` being set.
2024-04-25 12:34:38 -04:00
rafkub
cc9d3f063c
Update confirm.md (#2443)
Fix typo - repeated "and the"
2024-04-25 12:33:28 -04:00
Carson Gross
45dd5f168d move all references to extensions over to the new site/repo 2024-03-26 16:37:26 -06:00
Carson Gross
f1c3dc7cdc Merge branch 'master' into v2.0v2.0
# Conflicts:
#	www/content/docs.md
2024-03-13 15:43:02 -06:00
Mark Heptinstall
0355af9c8a
Show hx attributes used in bulk-update code example (#2274) 2024-02-19 10:02:05 -05:00
Carson Gross
8439fdad7c Merge remote-tracking branch 'origin/v2.0v2.0' into v2.0v2.0
# Conflicts:
#	www/content/examples/_index.md
2024-02-09 09:42:45 -07:00
Carson Gross
36c01420d6 Merge branch 'master' into v2.0v2.0 2024-02-09 09:41:49 -07:00
Katrina Grace
08dbe58645
Add web components / shadow DOM example to docs (#2283) 2024-02-07 16:34:13 -05:00
Sakib Hadžiavdić
3d0ec8542e
Fix edit-row example (#2273) 2024-02-05 15:56:32 -05:00
Mark Heptinstall
f18cbc5adf
Show element used for hx-indicator in value-select example code (#2275)
Show element used for hx-indicator in example code

Code examples does not include element with class `.htmx-indicator` used for hx-indicator attribute
2024-02-05 15:55:58 -05:00
Carson Gross
1b7ed8cb8e typo 2024-02-02 11:36:09 -07:00
Carson Gross
b55b9fc1a3 add async auth as an example 2024-02-02 11:29:23 -07:00
Yawar Amin
e6e423666e
Minimize re-rendering of 'bulk update users' table (#2249)
* Minimize re-rendering of 'bulk update users' table

And use ARIA to announce a summary of the bulk update. By using a
checkbox input to represent the activation status, we don't need to
re-render it when it's changed, because the checkbox itself manages that
state.

Re: #1431

* Improve screen reader pronunciation
2024-02-01 11:27:43 -05:00
Carson Gross
3fa7df1d23 Merge branch 'dev' into v2.0v2.0
# Conflicts:
#	dist/ext/sse.js
#	dist/htmx.d.ts
#	dist/htmx.js
#	dist/htmx.min.js
#	dist/htmx.min.js.gz
#	src/htmx.js
#	test/core/parameters.js
#	www/content/docs.md
2024-01-15 14:26:50 -07:00
félix
309593aa11
Fix typo in Hyperscript Tabs docs (#2164) 2024-01-13 14:20:23 -05:00
Carson Gross
894b4dd3e8 nuke hyperscript (for the most part) 2024-01-09 11:23:15 -07:00
Carson Gross
ff96b78e77 move to template parsing by default (prep for head support) 2023-12-27 14:42:14 -07:00
Mia
8d0338ade8
Fix the Django example in www/content/examples/confirm.md (#2062) 2023-11-30 15:57:30 -05:00
Max von Webel
0b0887c23e
Fixed typo in examples (#2002)
lower case "i" in UIKit
2023-11-16 15:22:09 +01:00
Alexander Petros
2e5f813c91
Replace keyup with input event (#1952)
`keyup` only works with a keyboard, and ignores pasting with a right click or programmatically updating the value with JS. 

`input` is a better event for detecting any "inputs to the input".

Co-authored-by: Sam Eaton <sam@eaton.party>
2023-11-08 22:33:26 +01:00
Carson Gross
5cd5f927ba Merge branch 'master' into dev 2023-11-02 15:12:37 -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
Ricky Tobing
c7f9dcb682
Documentation - Added link to https://javascript.info/keyboard-events (#1919) 2023-10-24 12:40: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
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
Cameron Beck
645f3570cc
Update file-upload.md (#1847)
Fixing a small typo in the documentation
2023-10-01 19:24:28 +02:00
vsyaco
8e4f69a1d3
[Documentation] Small typo fix in modal-bootstrap.md response example (#1804)
Documentation: fixing small typo in modal-bootstrap.md
2023-09-19 16:40:05 -04:00
gbourant
4af437a4e1
Add example of how to structure binary-data forms without data loss (#1670)
* prevent binary data loss by restructuring forms.

* Update www/content/docs.md

Co-authored-by: Denis Palashevskii <20725046+Renerick@users.noreply.github.com>

* moved the example to example directory

* Updated documentation based on feedback

---------

Co-authored-by: gbourant <root@gbourant.com>
Co-authored-by: Denis Palashevskii <20725046+Renerick@users.noreply.github.com>
2023-09-01 14:42:14 -04:00
Dominik Kozaczko
193cb67393
Cleaner Bootstrap 5 modals example. (#1111)
* Cleaner Bootstrap 5 example.

* Update window id

* Update close button

* Got it working
2023-08-01 14:41:17 -05:00
Viktor Szépe
0a471dc4fb
Fix typos in www/ (#1579) 2023-07-17 10:26:27 -04:00