diff --git a/docs/en_US/release_notes_8_6.rst b/docs/en_US/release_notes_8_6.rst index 682587dc6..97b40881b 100644 --- a/docs/en_US/release_notes_8_6.rst +++ b/docs/en_US/release_notes_8_6.rst @@ -36,3 +36,4 @@ Bug fixes | `Issue #7275 `_ - Fixed an issue where debugger was not scrolling automatically on stepping. | `Issue #7282 `_ - Fixed an XSS vulnerability in the /settings/store endpoint. | `Issue #7294 `_ - Fixed an issue where double dollar quoted code is treated as string in syntax highlighter. + | `Issue #7317 `_ - Fixed an issue where pressing backspace should remove the spaces and not the entire tab width, on enabling 'Use spaces?' in the preferences. \ No newline at end of file diff --git a/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx b/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx index 02b57f7b5..24ecd0d7c 100644 --- a/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx +++ b/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx @@ -28,7 +28,7 @@ import { keymap, } from '@codemirror/view'; import { EditorState, Compartment } from '@codemirror/state'; -import { history, defaultKeymap, historyKeymap, indentLess, indentMore } from '@codemirror/commands'; +import { history, defaultKeymap, historyKeymap, indentLess, indentMore, deleteCharBackwardStrict } from '@codemirror/commands'; import { closeBrackets, autocompletion, closeBracketsKeymap, completionKeymap, acceptCompletion } from '@codemirror/autocomplete'; import { foldGutter, @@ -118,6 +118,10 @@ const defaultExtensions = [ },{ key: 'Tab', run: acceptCompletion, + },{ + key: 'Backspace', + preventDefault: true, + run: deleteCharBackwardStrict, }]), sql({ dialect: PgSQL,