mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 22:41:23 +00:00
fix manual anchor test
This commit is contained in:
parent
cf3ece96ab
commit
1e211eee87
@ -1289,7 +1289,7 @@ var htmx = (function() {
|
||||
})
|
||||
|
||||
if (swapOptions.anchor) {
|
||||
const anchorTarget = resolveTarget(swapOptions.anchor)
|
||||
const anchorTarget = resolveTarget("#" + swapOptions.anchor)
|
||||
if (anchorTarget) {
|
||||
anchorTarget.scrollIntoView({ block: 'start', behavior: 'auto' })
|
||||
}
|
||||
@ -3566,8 +3566,7 @@ var htmx = (function() {
|
||||
}
|
||||
|
||||
// restore any anchor associated with the request
|
||||
if (responseInfo.pathInfo.anchor &&
|
||||
path.indexOf('#') === -1) {
|
||||
if (responseInfo.pathInfo.anchor && path.indexOf('#') === -1) {
|
||||
path = path + '#' + responseInfo.pathInfo.anchor
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user