diff --git a/docs/en_US/release_notes_9_16.rst b/docs/en_US/release_notes_9_16.rst index a7ec92e1bee..0b7823fd66c 100644 --- a/docs/en_US/release_notes_9_16.rst +++ b/docs/en_US/release_notes_9_16.rst @@ -25,3 +25,5 @@ Housekeeping Bug fixes ********* + + | `Issue #9864 `_ - Fixed a regression where the rectangular (block/column) text selection in the code editor stopped working; restored the default Alt+drag selection without re-introducing the crosshair cursor on Alt+F5 (#9570). diff --git a/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx b/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx index 935ba415e54..013aa3a03cf 100644 --- a/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx +++ b/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx @@ -25,7 +25,6 @@ import { drawSelection, dropCursor, rectangularSelection, - crosshairCursor, highlightActiveLine, EditorView, keymap, @@ -120,8 +119,12 @@ function insertTabWithUnit({ state, dispatch }) { const defaultExtensions = [ highlightSpecialChars(), dropCursor(), - rectangularSelection({ eventFilter: (e) => e.altKey && e.ctrlKey }), - crosshairCursor({ key: 'Control' }), + // rectangularSelection() restores the default Alt+drag block (column) + // selection. crosshairCursor is intentionally not used: it displayed a + // crosshair cursor whenever Alt was held - including for the Alt+F5 run + // shortcut (#9570). Omitting it keeps that fix while restoring the block + // selection that was lost. #9864 #10029 + rectangularSelection(), EditorState.allowMultipleSelections.of(true), indentOnInput(), syntaxHighlighting,