From 69bfd59c3ce3dd9804da76e5909b8f0d75f573a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E9=A2=97=E7=BA=A2=E5=BF=83?= Date: Fri, 3 Jul 2026 11:12:49 +0800 Subject: [PATCH] fix(sql-library): restore Ctrl+click multi-select on Windows (#2470) --- apps/desktop/src/App.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index 2581d0f23e..4befc24185 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -41,6 +41,7 @@ import { findTreeNodeById, resolveNewQueryTarget } from "@/lib/newQueryContext"; import { buildExecutableObjectSourceStatements, objectSourceSaveExecutionMode } from "@/lib/objectSourceEditor"; import { resolveExecutableSql, resolveExecutableSqlWithBackend, type SqlExecutionSnapshot } from "@/lib/sqlExecutionTarget"; import { uuid } from "@/lib/utils"; +import { isMacOS } from "@/lib/platform"; import { isTauriRuntime } from "@/lib/tauriRuntime"; import { openQueryResultArchiveFile } from "@/lib/queryResultArchiveFile"; import { sqlFileTitleFromPath } from "@/lib/sqlFileOpen"; @@ -1639,10 +1640,11 @@ onMounted(async () => { } // macOS: Ctrl+click fires both click and contextmenu. // Intercept click in capture phase to prevent unwanted navigation. + // Windows/Linux use Ctrl+click for multi-select; do not block there. document.addEventListener( "click", (e) => { - if (e.ctrlKey) e.stopPropagation(); + if (e.ctrlKey && isMacOS()) e.stopPropagation(); }, true, );