diff --git a/apps/client/src/widgets/buttons/global_menu.tsx b/apps/client/src/widgets/buttons/global_menu.tsx index 39fcb88e8..73f126913 100644 --- a/apps/client/src/widgets/buttons/global_menu.tsx +++ b/apps/client/src/widgets/buttons/global_menu.tsx @@ -155,7 +155,7 @@ function ZoomControls({ parentComponent }: { parentComponent?: Component | null useEffect(updateZoomState, []); - function ZoomControlButton({ command, title, icon, children }: { command: KeyboardActionNames, title: string, icon?: string, children?: ComponentChildren }) { + function ZoomControlButton({ command, title, icon, children, dismiss }: { command: KeyboardActionNames, title: string, icon?: string, children?: ComponentChildren, dismiss?: boolean }) { const linkRef = useRef(null); useStaticTooltipWithKeyboardShortcut(linkRef, title, command, { placement: "bottom", @@ -167,8 +167,10 @@ function ZoomControls({ parentComponent }: { parentComponent?: Component | null tabIndex={0} onClick={(e) => { parentComponent?.triggerCommand(command); - setTimeout(() => updateZoomState(), 300) - e.stopPropagation(); + setTimeout(() => updateZoomState(), 300); + if (!dismiss) { + e.stopPropagation(); + } }} className={`dropdown-item-button ${icon}`} >{children} @@ -184,7 +186,7 @@ function ZoomControls({ parentComponent }: { parentComponent?: Component | null {t("global_menu.zoom")} <>
- +   {zoomLevel}{t("units.percentage")}