Fixed swapSpec when view

This commit is contained in:
Ben Croker 2020-07-06 18:23:00 +02:00 committed by GitHub
parent aaae399308
commit 5202de5524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1338,7 +1338,7 @@ return (function () {
swapSpec["scroll"] = modifier.substr(7);
}
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.scroll === "top") {
if (swapSpec.view === "top") {
target.scrollIntoView(true);
}
if (swapSpec.scroll === "bottom") {
if (swapSpec.view === "bottom") {
target.scrollIntoView(false);
}
}