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.
This commit is contained in:
t8y2
2026-05-09 14:51:47 +08:00
parent ce2f97a175
commit 9a9f67f9ae
+2 -1
View File
@@ -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();