always scroll when pin is clicked (#4281)
This commit is contained in:
parent
fcd3d991ee
commit
e4fafb05b2
|
@ -51,6 +51,12 @@ function addRow(table, pin, cid) {
|
|||
}
|
||||
|
||||
function clickPin(table, pin, cid) {
|
||||
var container;
|
||||
for (var elem = table; elem && elem !== document; elem = elem.parentNode) {
|
||||
if (elem.matches(".container")) {
|
||||
container = elem;
|
||||
};
|
||||
}
|
||||
table.parentElement.style.display = "table";
|
||||
table.innerHTML = "";
|
||||
addRow(table, pin, cid);
|
||||
|
@ -75,6 +81,7 @@ function clickPin(table, pin, cid) {
|
|||
url.search = "";
|
||||
window.history.pushState({}, "", url)
|
||||
}
|
||||
container.scrollIntoView()
|
||||
}
|
||||
function checkparams() {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
|
|
Loading…
Reference in New Issue