From 022cf3d93c8c02eedf73f5af1b709a8259223bc4 Mon Sep 17 00:00:00 2001 From: Murtuza Zabuawala Date: Fri, 8 Nov 2019 18:41:57 +0530 Subject: [PATCH] Fixed an issue where keyboard shortcut for context menu is not working when using Firefox on CentOS7. Fixes #4906 --- docs/en_US/release_notes_4_15.rst | 3 ++- web/pgadmin/browser/static/js/keyboard.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en_US/release_notes_4_15.rst b/docs/en_US/release_notes_4_15.rst index e36dd872d..270df2f9d 100644 --- a/docs/en_US/release_notes_4_15.rst +++ b/docs/en_US/release_notes_4_15.rst @@ -47,4 +47,5 @@ Bug fixes | `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. -| `Issue #4896 `_ - Fixed an issue where escape key not working to close the open/save file dialog. \ No newline at end of file +| `Issue #4896 `_ - Fixed an issue where escape key not working to close the open/save file dialog. +| `Issue #4906 `_ - Fixed an issue where keyboard shortcut for context menu is not working when using Firefox on CentOS7. \ No newline at end of file diff --git a/web/pgadmin/browser/static/js/keyboard.js b/web/pgadmin/browser/static/js/keyboard.js index 1a402da8d..ba1a7806d 100644 --- a/web/pgadmin/browser/static/js/keyboard.js +++ b/web/pgadmin/browser/static/js/keyboard.js @@ -307,8 +307,9 @@ _.extend(pgBrowser.keyboardNavigation, { }, bindContextMenu: function(event) { const tree = this.getTreeDetails(); - const left = $(event.srcElement).find('.aciTreeEntry').position().left + 70; - const top = $(event.srcElement).find('.aciTreeEntry').position().top + 70; + let _srcElement = event.srcElement || event.target; + const left = $(_srcElement).find('.aciTreeEntry').position().left + 70; + const top = $(_srcElement).find('.aciTreeEntry').position().top + 70; tree.t.blur(tree.i); $('#tree').trigger('blur');