Skip to content

Commit

Permalink
Fix AD resource fetch/await controls so that template w/full resource…
Browse files Browse the repository at this point in the history
… info is displayed (SDC and PDF)
  • Loading branch information
daniellrgn committed Dec 12, 2024
1 parent d325b73 commit 256eb25
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,27 @@
$isOpen = false;
}
let navOpening = false;
document.addEventListener('click', (event) => {
// Ignore clicks on the navbar toggler
if (event.target?.className?.includes('navbar-toggler')) return;
// Ignore clicks on the dropdown toggle menu items
if (event.target?.className?.includes('nav-link') && event.target?.className?.includes('dropdown-toggle')) {
navOpening = true;
setTimeout(() => {
navOpening = false;
}, 100);
return;
}
closeNav();
});
document.addEventListener('keydown', (event) => {
closeNav();
});
window.addEventListener('scroll', (event) => {
if (document.getElementsByClassName('navbar-collapse collapsing').length > 0) return;
if (navOpening) return;
closeNav();
});
Expand Down

0 comments on commit 256eb25

Please sign in to comment.