From 9a9f67f9ae069ff6bea972a075fb18240abcab9a Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sat, 9 May 2026 14:51:36 +0800 Subject: [PATCH] fix(window): prevent double-toggle on titlebar double-click (#179) data-tauri-drag-region already handles double-click to maximize natively; the @dblclick handler was calling toggleMaximize() again, immediately restoring the window. --- src/components/layout/AppToolbar.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/layout/AppToolbar.vue b/src/components/layout/AppToolbar.vue index ecf8c6604f..164a44691e 100644 --- a/src/components/layout/AppToolbar.vue +++ b/src/components/layout/AppToolbar.vue @@ -43,9 +43,10 @@ const emit = defineEmits<{ }>(); const { t } = useI18n(); -const { isMac, showControls, isMaximized, minimize, toggleMaximize, close } = useWindowControls(); +const { isMac, isDesktop, showControls, isMaximized, minimize, toggleMaximize, close } = useWindowControls(); function onToolbarDblClick(e: MouseEvent) { + if (isDesktop) return; const target = e.target as HTMLElement; if (target.closest("button, [role='button'], a")) return; toggleMaximize();