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

This commit is contained in:
Rohit Bhati 2024-08-01 11:48:16 +05:30 committed by GitHub
parent 88f033e2a8
commit 5d7ec14076
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -262,9 +262,9 @@ _.extend(pgBrowser.keyboardNavigation, {
node_obj, {action: 'create', item: tree.i}
);
},
bindSubMenuDelete: function() {
bindSubMenuDelete: function(event) {
const tree = this.getTreeDetails();
if (!tree.d || pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type].collection_node === true || document.activeElement.className !== 'file-tree')
if (!tree.d || pgAdmin.Browser.Nodes[tree.t.itemData(tree.i)._type].collection_node === true || !event?.target?.classList?.contains('file-tree'))
return;
// Call delete object callback