summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/htmx.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/htmx.js b/src/htmx.js
index e49778fc..0767b878 100644
--- a/src/htmx.js
+++ b/src/htmx.js
@@ -937,7 +937,7 @@ return (function () {
function shouldCancel(elt) {
return elt.tagName === "FORM" ||
(matches(elt, 'input[type="submit"], button') && closest(elt, 'form') !== null) ||
- (elt.tagName === "A" && elt.href && elt.getAttribute('href').indexOf('#') !== 0);
+ (elt.tagName === "A" && elt.href && elt.getAttribute('href') === '#');
}
function ignoreBoostedAnchorCtrlClick(elt, evt) {