From 19237fe2479aff26f2691ceeecd39a9411710fae Mon Sep 17 00:00:00 2001 From: Rohit Bhati Date: Wed, 31 Jul 2024 11:25:08 +0530 Subject: [PATCH] Fixed an issue where delete object(shortcut key) affecting both text and Object Explorer items. #7683 --- web/pgadmin/browser/static/js/keyboard.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/pgadmin/browser/static/js/keyboard.js b/web/pgadmin/browser/static/js/keyboard.js index 101d4857e..9a17d4fc8 100644 --- a/web/pgadmin/browser/static/js/keyboard.js +++ b/web/pgadmin/browser/static/js/keyboard.js @@ -264,8 +264,7 @@ _.extend(pgBrowser.keyboardNavigation, { }, bindSubMenuDelete: function() { const tree = this.getTreeDetails(); - - if (!tree.d || pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type].collection_node === true) + if (!tree.d || pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type].collection_node === true || document.activeElement.className !== 'file-tree') return; // Call delete object callback