feat(grid): add configurable shortcut to focus WHERE condition
This commit is contained in:
27 files changed
+325
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user