Skip to content
Snippets Groups Projects
Commit 8627ab4d authored by Austin Anderson's avatar Austin Anderson
Browse files

Handle live focus differently

parent c6948c5f
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,9 @@ $(function () {
// Empty!
// If the hash matches a Category on the page, then scroll to it
} else if (document.getElementById(unescaped)) {
if (document.hasFocus()) {
document.getElementById(unescaped).scrollIntoView();
} else {
let scrolled = false
$(window).focus(function() {
if (!scrolled) {
......@@ -115,6 +118,7 @@ $(function () {
scrolled = true
}
})
}
// If the hash is exactly 41 chars (hash sign # plus a 40-char sha hash),
// just show that modal.
} else if (window.location.hash.length == 41) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment