Revert "Make main menu full width on mobile again."

This reverts commit 70d48d5472.
This commit is contained in:
barnabasmolnar 2023-04-26 12:52:35 +02:00
parent 70d48d5472
commit b63d17045e
5 changed files with 15 additions and 22 deletions

View file

@ -33,7 +33,9 @@ const MainMenu = Object.assign(
const device = useDevice();
const appState = useExcalidrawAppState();
const setAppState = useExcalidrawSetAppState();
const onClickOutside = () => setAppState({ openMenu: null });
const onClickOutside = device.isMobile
? undefined
: () => setAppState({ openMenu: null });
return (
<mainMenuTunnel.In>
@ -48,11 +50,6 @@ const MainMenu = Object.assign(
{HamburgerMenuIcon}
</DropdownMenu.Trigger>
<DropdownMenu.Content
collisionBoundary={
device.isMobile
? document.querySelector(".App-bottom-bar")
: undefined
}
sideOffset={device.isMobile ? 20 : undefined}
className="mainmenu-content"
onClickOutside={onClickOutside}