From cd61f3111684244133ae02d42109e8f29eaf6cc9 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Mon, 5 Sep 2022 12:30:47 +0200 Subject: [PATCH] fix: buttons jump around on the mobile menu (#5658) Update MobileMenu.tsx --- src/components/MobileMenu.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/MobileMenu.tsx b/src/components/MobileMenu.tsx index f6e28f44..a2054754 100644 --- a/src/components/MobileMenu.tsx +++ b/src/components/MobileMenu.tsx @@ -121,7 +121,6 @@ export const MobileMenu = ({ const renderAppToolbar = () => { // Render eraser conditionally in mobile const showEraser = - !appState.viewModeEnabled && !appState.editingElement && getSelectedElements(elements, appState).length === 0; @@ -140,11 +139,11 @@ export const MobileMenu = ({ {actionManager.renderAction("undo")} {actionManager.renderAction("redo")} - {showEraser && actionManager.renderAction("eraser")} - - {actionManager.renderAction( - appState.multiElement ? "finalize" : "duplicateSelection", - )} + {showEraser + ? actionManager.renderAction("eraser") + : actionManager.renderAction( + appState.multiElement ? "finalize" : "duplicateSelection", + )} {actionManager.renderAction("deleteSelectedElements")} );