diff --git a/web/pgadmin/browser/templates/browser/js/node.js b/web/pgadmin/browser/templates/browser/js/node.js index d507c783c..94da24e61 100644 --- a/web/pgadmin/browser/templates/browser/js/node.js +++ b/web/pgadmin/browser/templates/browser/js/node.js @@ -535,8 +535,13 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) { pgBrowser.report_error(res.errormsg, res.info); } else { var n = t.next(i); - if (!n || !n.length) + if (!n || !n.length) { n = t.prev(i); + if (!n || !n.length) { + n = t.parent(i); + t.setInode(n, true); + } + } t.remove(i); if (n.length) { t.select(n);