From 2522c8c9e29673a3046d95d04ed8ac8a08893b3a Mon Sep 17 00:00:00 2001 From: Nagesh Dhope Date: Fri, 8 Nov 2019 18:26:46 +0530 Subject: [PATCH] Fixed an issue where escape key not working to close the open/save file dialog. Fixes #4896 --- docs/en_US/release_notes_4_15.rst | 3 ++- web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_4_15.rst b/docs/en_US/release_notes_4_15.rst index 494412764..e36dd872d 100644 --- a/docs/en_US/release_notes_4_15.rst +++ b/docs/en_US/release_notes_4_15.rst @@ -46,4 +46,5 @@ Bug fixes | `Issue #4835 `_ - Fixed an issue where psql of v12 throwing "symbol not found" error while running Maintenance and Import/Export. | `Issue #4845 `_ - Fixed potential error in the properties dialog for the Code tab. | `Issue #4850 `_ - Fixed an issue where Datetimepicker control opens when clicking on the label. -| `Issue #4895 `_ - Fixed potential issue in reset function for nested objects. \ No newline at end of file +| `Issue #4895 `_ - Fixed potential issue in reset function for nested objects. +| `Issue #4896 `_ - Fixed an issue where escape key not working to close the open/save file dialog. \ No newline at end of file diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index ee370a262..70d4bd348 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -2256,7 +2256,7 @@ define('tools.querytool', [ * loses focus and events don't work. */ $(window).on('keydown', (e)=>{ - if(self.gridView.keyAction) { + if(($('.sql-editor').find(e.target).length !== 0 || e.target == $('body.wcDesktop')[0]) && self.gridView.keyAction) { self.gridView.keyAction(e); } });