diff --git a/misc/pinout-gen/script.js b/misc/pinout-gen/script.js index 800349987e..e637940dc2 100644 --- a/misc/pinout-gen/script.js +++ b/misc/pinout-gen/script.js @@ -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);