Fixed an issue where delete object(shortcut key) affecting both text and Object Explorer items. #7683

This commit is contained in:
Rohit Bhati 2024-07-31 11:25:08 +05:30 committed by GitHub
parent 729c370125
commit 19237fe247
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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