diff --git a/docs/en_US/release_notes_6_5.rst b/docs/en_US/release_notes_6_5.rst index ae34d7503..60ff5743b 100644 --- a/docs/en_US/release_notes_6_5.rst +++ b/docs/en_US/release_notes_6_5.rst @@ -26,5 +26,6 @@ Bug fixes | `Issue #7109 `_ - Make the size blank for all the directories in the file select dialog. | `Issue #7118 `_ - Ensure that JSON files should be downloaded properly from the storage manager. | `Issue #7123 `_ - Fixed an issue where restore generates incorrect options for the schema. +| `Issue #7126 `_ - Fixed an issue where the F2 Function key removes browser panel contents. | `Issue #7127 `_ - Added validation for Hostname in the server dialog. | `Issue #7135 `_ - Enforce the minimum Windows version that the installer will run on. diff --git a/web/package.json b/web/package.json index 3d598a0c8..833d41ebc 100644 --- a/web/package.json +++ b/web/package.json @@ -138,7 +138,7 @@ "path-fx": "^2.0.0", "pathfinding": "^0.4.18", "paths-js": "^0.4.9", - "pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#90e62d4371d3d25a957b3ffc7c6cb81a928da06f", + "pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#bf7ac7be65898883e3e05c9733426152a1da6422", "postcss": "^8.2.15", "raf": "^3.4.1", "react": "^17.0.1", diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index 53c4ac45d..3edfd7e79 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -1269,14 +1269,19 @@ define('pgadmin.browser', [ // If there is no parent then just update the node if(this.t.isRootNode(_parent) || (_parent && _parent.length == 0 && ctx.op == 'UPDATE')) { - var that = this; - this.t.remove(this.i).then(() => { - that.t.before(that.i, that.new).then((new_item) => { - that.t.select(new_item); - }, () => { - console.warn('Failed to add before..', arguments); + //Update node if browser has single child node. + if(this.t.children().length === 1) { + updateNode(); + } else { + var that = this; + this.t.remove(this.i).then(() => { + that.t.before(that.i, that.new).then((new_item) => { + that.t.select(new_item); + }, () => { + console.warn('Failed to add before..', arguments); + }); }); - }); + } } else { var postRemove = function() { // If item has parent but no grand parent