fix(editor): preserve multi-click selection drags

This commit is contained in:
Eve authored and GitHub committed 2026-09-10 14:30:23 +08:00
1 parent b37f63e716
commit a688aadec2
4 files changed
+20 -19

No files matched your search

@@ -199,16 +199,3 @@ describe("QueryEditor batch column selection", () => {
expect(source).toContain("maxRenderedOptions: batchColumnSelectionExpandedRendering ? Number.MAX_SAFE_INTEGER : 100,");
});
});
describe("QueryEditor pointer selection", () => {
it("lets CodeMirror handle shift-click instead of starting the selection drag gesture", () => {
const start = source.indexOf("function startEditorSelectionDrag");
const end = source.indexOf("\n}\n\nfunction executeFromContextMenu", start);
const dragSource = source.slice(start, end);
expect(start).toBeGreaterThanOrEqual(0);
expect(end).toBeGreaterThan(start);
expect(dragSource).toContain("if (event.shiftKey) return false;");
expect(dragSource.indexOf("if (event.shiftKey) return false;")).toBeLessThan(dragSource.indexOf("const selection = selectedRangeAtPointer"));
});
});