feat(grid): add configurable shortcut to focus WHERE condition

This commit is contained in:
关关 authored and GitHub committed 2026-09-30 01:20:31 +08:00
1 parent 530bb2bb52
commit 7bc85dfcb0
27 files changed
+325

No files matched your search

+9
View File
@@ -111,6 +111,7 @@ import {
isExecuteSqlInNewResultTabShortcut,
isExecuteSqlShortcut,
isFocusSearchShortcut,
isFocusWhereShortcut,
isGoToColumnShortcut,
isModRShortcut,
handleTabHistoryNavigationShortcut,
@@ -3708,6 +3709,14 @@ async function handleKeydown(e: KeyboardEvent) {
const shortcuts = settingsStore.editorSettings.shortcuts;
if (showTabSwitcher.value) return;
if (isFocusWhereShortcut(e, shortcuts) && !showSettingsPage.value && !showPluginCenter.value && !showDriverStore.value) {
const target = e.target instanceof Element ? e.target : null;
if (!target?.closest('[role="dialog"], [role="alertdialog"]') && contentAreaRef.value?.focusWhere()) {
e.preventDefault();
e.stopPropagation();
return;
}
}
// Grid-scoped shortcuts normally win inside DataGrid. Keep that precedence
// for a data tab even when focus is in a sibling input, where the grid's
// local listener intentionally leaves native editing untouched.