From 398675597a5df7a3d7ccd95896bf95d7e4be756d Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Mon, 7 Nov 2022 13:59:18 +0530 Subject: [PATCH] Fixed an issue where AutoComplete was not working correctly due to incorrect regex. #5473 --- docs/en_US/release_notes_6_16.rst | 2 ++ web/pgadmin/static/js/components/CodeMirror.jsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_6_16.rst b/docs/en_US/release_notes_6_16.rst index 1b6f9c2ef..50d0bb349 100644 --- a/docs/en_US/release_notes_6_16.rst +++ b/docs/en_US/release_notes_6_16.rst @@ -25,6 +25,7 @@ Housekeeping Bug fixes ********* + | `Issue #2174 `_ - Ensure that the browser tree should auto scroll to the selected node when expanding the server node. | `Issue #4841 `_ - Use SocketIO instead of REST for schema diff compare. | `Issue #5066 `_ - Ensure that users can use custom characters as CSV field separators/CSV quotes when downloading query results. | `Issue #5058 `_ - Ensure that the save button should be disabled by default on the Sort/Filter dialog in the query tool. @@ -37,4 +38,5 @@ Bug fixes | `Issue #5429 `_ - Fixed an issue where parameters for roles were not visible. | `Issue #5455 `_ - Fixed an issue where the dependents tab wasn't working for PG 15. | `Issue #5458 `_ - Ensure that the browser path column in the search object shows the complete path. + | `Issue #5473 `_ - Fixed an issue where AutoComplete was not working correctly due to incorrect regex. | `Issue #5475 `_ - Fixed an issue where the 'Confirm on close or refresh' setting was ignored when closing the query/ERD tool opened in the new tab. diff --git a/web/pgadmin/static/js/components/CodeMirror.jsx b/web/pgadmin/static/js/components/CodeMirror.jsx index 34126dd50..ad030fad5 100644 --- a/web/pgadmin/static/js/components/CodeMirror.jsx +++ b/web/pgadmin/static/js/components/CodeMirror.jsx @@ -468,7 +468,7 @@ export default function CodeMirror({currEditor, name, value, options, events, re let pref = pgWindow?.pgAdmin?.Browser?.get_preferences_for_module('sqleditor') || {}; if (autocomplete && pref.autocomplete_on_key_press) { editor.current.on('keyup', (cm, event)=>{ - if (!cm.state.completionActive && (event.key == 'Backspace' || /^[ -~]{1}$'/.test(event.key))) { + if (!cm.state.completionActive && (event.key == 'Backspace' || /^[ -~]{1}$/.test(event.key))) { OrigCodeMirror.commands.autocomplete(cm, null, {completeSingle: false}); } });