fix dropdown overlapping with welcome screen

This commit is contained in:
Ryan Di
2025-09-23 12:45:45 +10:00
parent e101c2ca7c
commit 995357cbf9
2 changed files with 24 additions and 14 deletions

View File

@@ -60,16 +60,6 @@ export const MobileMenu = ({
MainMenuTunnel,
DefaultSidebarTriggerTunnel,
} = useTunnels();
const renderToolbar = () => {
return (
<MobileToolBar
appState={appState}
app={app}
onHandToolToggle={onHandToolToggle}
/>
);
};
const renderAppTopBar = () => {
if (
appState.viewModeEnabled ||
@@ -99,13 +89,25 @@ export const MobileMenu = ({
);
};
const renderToolbar = () => {
return (
<MobileToolBar
appState={appState}
app={app}
onHandToolToggle={onHandToolToggle}
/>
);
};
return (
<>
{renderSidebars()}
<FixedSideContainer side="top" className="App-top-bar">
{renderAppTopBar()}
{/* welcome screen, bottom bar, and top bar all have the same z-index */}
{/* ordered in this reverse order so that top bar is on top */}
<div className="App-welcome-screen">
{renderWelcomeScreen && <WelcomeScreenCenterTunnel.Out />}
</FixedSideContainer>
</div>
<div
className="App-bottom-bar"
style={{
@@ -141,6 +143,10 @@ export const MobileMenu = ({
)}
</Island>
</div>
<FixedSideContainer side="top" className="App-top-bar">
{renderAppTopBar()}
</FixedSideContainer>
</>
);
};

View File

@@ -237,6 +237,10 @@ body.excalidraw-cursor-resize * {
flex-direction: column;
}
.App-welcome-screen {
z-index: var(--zIndex-layerUI);
}
.App-bottom-bar {
position: absolute;
// account for margins
@@ -246,7 +250,7 @@ body.excalidraw-cursor-resize * {
left: 50%;
transform: translateX(-50%);
--bar-padding: calc(4 * var(--space-factor));
z-index: 3;
z-index: var(--zIndex-layerUI);
display: flex;
flex-direction: column;