Skip to content

Commit e7d920d

Browse files
authored
Upgrade htmx to 2.0.6 (#538)
1 parent ad93b03 commit e7d920d

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Changelog
33
=========
44

5+
* Upgrade the vendored htmx to `version 2.0.6 <https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#206---2025-06-27>`__.
6+
57
1.23.1 (2025-06-21)
68
-------------------
79

docs/template_tags.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ __ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#defer
1919
The ``htmx_script`` template tag renders two script tags for:
2020

2121
1. The vendored version of htmx included in django-htmx.
22-
The current vendored version of htmx is 2.0.5.
22+
The current vendored version of htmx is 2.0.6.
2323
(`htmx release notes <https://github.com/bigskysoftware/htmx/releases>`__.)
2424

2525
2. django-htmx’s extension script, when |settings.DEBUG|__ is ``True``.

src/django_htmx/static/django_htmx/htmx.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ var htmx = (function() {
289289
location,
290290
/** @type {typeof internalEval} */
291291
_: null,
292-
version: '2.0.5'
292+
version: '2.0.6'
293293
}
294294
// Tsc madness part 2
295295
htmx.onLoad = onLoadHelper
@@ -2435,7 +2435,9 @@ var htmx = (function() {
24352435
if (elt.form && elt.type === 'submit') {
24362436
return true
24372437
}
2438-
if (elt instanceof HTMLAnchorElement && elt.href &&
2438+
elt = elt.closest('a')
2439+
// @ts-ignore check for a link wrapping the event elt or if elt is a link. elt will be link so href check is fine
2440+
if (elt && elt.href &&
24392441
(elt.getAttribute('href') === '#' || elt.getAttribute('href').indexOf('#') !== 0)) {
24402442
return true
24412443
}

src/django_htmx/static/django_htmx/htmx.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)