mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 15:25:26 +00:00
Fixed swapSpec
when view
This commit is contained in:
parent
aaae399308
commit
5202de5524
@ -1338,7 +1338,7 @@ return (function () {
|
|||||||
swapSpec["scroll"] = modifier.substr(7);
|
swapSpec["scroll"] = modifier.substr(7);
|
||||||
}
|
}
|
||||||
if (modifier.indexOf("view:") === 0) {
|
if (modifier.indexOf("view:") === 0) {
|
||||||
swapSpec["view"] = modifier.substr(7);
|
swapSpec["view"] = modifier.substr(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1374,10 +1374,10 @@ return (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (swapSpec.view) {
|
if (swapSpec.view) {
|
||||||
if (swapSpec.scroll === "top") {
|
if (swapSpec.view === "top") {
|
||||||
target.scrollIntoView(true);
|
target.scrollIntoView(true);
|
||||||
}
|
}
|
||||||
if (swapSpec.scroll === "bottom") {
|
if (swapSpec.view === "bottom") {
|
||||||
target.scrollIntoView(false);
|
target.scrollIntoView(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user