Skip to content

Commit 7eb40e4

Browse files
committed
fix: sidebar issue
1 parent 9781deb commit 7eb40e4

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/lib/layout/shell.svelte

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@
7676
showAccountMenu = false;
7777
}
7878
79+
function closeOpenDialogs() {
80+
if (typeof document === 'undefined') return;
81+
82+
const openDialogs = Array.from(
83+
document.querySelectorAll('dialog[open]')
84+
) as HTMLDialogElement[];
85+
86+
for (const dialog of openDialogs) {
87+
dialog.close();
88+
}
89+
90+
document.documentElement.classList.remove('u-overflow-hidden');
91+
}
92+
7993
/**
8094
* Cancel navigation when wizard is open and triggered by popstate
8195
*/
@@ -184,6 +198,7 @@
184198
$: isProjectBlocked = getIsProjectBlocked(selectedProject);
185199
$: {
186200
if ($isSidebarOpen) {
201+
closeOpenDialogs();
187202
yOnMenuOpen = window.scrollY;
188203
bodyStyle.set({ position: 'fixed', top: `-${window.scrollY}px` });
189204
} else if (!$isSidebarOpen) {
@@ -260,7 +275,7 @@
260275
<style lang="scss">
261276
.shell-sidebar-area {
262277
position: relative;
263-
z-index: 2;
278+
z-index: 20;
264279
}
265280
266281
.content {
@@ -335,7 +350,7 @@
335350
height: 100vh;
336351
right: 0;
337352
top: 0;
338-
z-index: 10;
353+
z-index: 19;
339354
background-color: #56565c1a;
340355
backdrop-filter: blur(5px);
341356
transition:

0 commit comments

Comments
 (0)