Skip to content

Commit

Permalink
fixed copy bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zirreal committed Sep 27, 2024
1 parent 2168828 commit cf21329
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/assets/css/components/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ background-color: var(--color-focus-light);
padding-left: calc( var(--space) / 4);
}

::selection {
.menu::selection {
background-color: transparent;
}

Expand Down
11 changes: 8 additions & 3 deletions src/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ document.addEventListener('DOMContentLoaded', () => {

document.addEventListener('click', (e) => {
allPopovers.forEach(popover => {
if (!popover.matches(":popover-open") && e.target !== mobileSidebarContent && !popover.matches(":popover-open") && e.target !== mobileSidebarDocs) {
mobileSidebarContent.classList.remove('open')
mobileSidebarDocs.classList.remove('open')
if (popover && !popover.matches(":popover-open") && e.target !== mobileSidebarContent && !popover.matches(":popover-open") && e.target !== mobileSidebarDocs) {
if(mobileSidebarContent && mobileSidebarContent.classList.contains('open')) {
mobileSidebarContent.classList.remove('open')
}

if(mobileSidebarDocs && mobileSidebarDocs.classList.contains('open')) {
mobileSidebarDocs.classList.remove('open')
}
}
})
})
Expand Down

0 comments on commit cf21329

Please sign in to comment.