Skip to content

Commit

Permalink
Fixed delete object(shortcut key) affecting both text and Object Expl…
Browse files Browse the repository at this point in the history
…orer items. pgadmin-org#7683
  • Loading branch information
RohitBhati8269 authored Aug 1, 2024
1 parent 88f033e commit 5d7ec14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/pgadmin/browser/static/js/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d7ec14

Please sign in to comment.