mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 13:31:06 +00:00
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)
This commit is contained in:
parent
a679244c40
commit
1040ace093
@ -3551,7 +3551,7 @@ return (function () {
|
||||
}
|
||||
}
|
||||
if (responseInfo.pathInfo.anchor) {
|
||||
var anchorTarget = find("#" + responseInfo.pathInfo.anchor);
|
||||
var anchorTarget = getDocument().getElementById(responseInfo.pathInfo.anchor);
|
||||
if(anchorTarget) {
|
||||
anchorTarget.scrollIntoView({block:'start', behavior: "auto"});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user