fix(editor): place caret on click after unfocused sql scroll

Closes #9296
This commit is contained in:
九日 authored and GitHub committed 2026-09-16 21:23:58 +08:00
1 parent 9cb6b28a0f
commit 85653427ef
3 files changed
+190

No files matched your search

@@ -154,6 +154,7 @@ import { createSqlAliasHighlights } from "@/lib/editor/codemirrorSqlAliasHighlig
import { createInsertValueHintsExtension, requestInsertValueHintsRefresh, supportsInsertValueHints } from "@/lib/editor/codemirrorInsertValueHints";
import { sqlBlockFoldService } from "@/lib/editor/codemirrorSqlBlockFolding";
import { focusEditorView } from "@/lib/editor/queryEditorFocus";
import { stabilizeUnfocusedQueryEditorPointerDown } from "@/lib/editor/queryEditorUnfocusedPointer";
import { createDbxCodeMirrorSqlDialect, type CodeMirrorSqlDialectName } from "@/lib/editor/codemirrorSqlDialect";
import { sqlSemanticTableNameSpansForSyntaxTree } from "@/lib/editor/codemirrorSqlSemanticHighlight";
import { startsQueryEditorRectangularSelection, startsQueryEditorSelectionDrag, usesQueryEditorObjectNavigationModifier } from "@/lib/editor/queryEditorPointerSelection";
@@ -6629,6 +6630,7 @@ onMounted(async () => {
if (currentView && startEditorSelectionDrag(currentView, event)) {
return true;
}
if (currentView) stabilizeUnfocusedQueryEditorPointerDown(currentView, event);
// Alt belongs to CodeMirror's rectangular and multi-cursor gestures,
// even when Cmd/Ctrl is held at the same time.
if (!usesQueryEditorObjectNavigationModifier(event)) {