From 9edc1d225e9bef2dcb20cefad45b6a3d7ed4097f Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Tue, 7 May 2024 17:35:03 +0530 Subject: [PATCH] Fixed an issue of the pgAdmin window size increasing each time it was reopened. #6464 --- docs/en_US/release_notes_8_7.rst | 3 +++ runtime/src/js/pgadmin.js | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/docs/en_US/release_notes_8_7.rst b/docs/en_US/release_notes_8_7.rst index 1374894bb..d8a964b0b 100644 --- a/docs/en_US/release_notes_8_7.rst +++ b/docs/en_US/release_notes_8_7.rst @@ -21,11 +21,14 @@ New features ************ | `Issue #7192 `_ - Changes in Query Tool, Debugger, and ERD Tool shortcuts to remove the use of Accesskey which will allow them to be customized. + | `Issue #7411 `_ - Enhance the Delete dialog by highlighting the names of the objects to be deleted in bold. Housekeeping ************ + | `Issue #7419 `_ - Upgrade react-table from v7 to v8. Bug fixes ********* + | `Issue #6464 `_ - Fixed an issue of the pgAdmin window size increasing each time it was reopened. diff --git a/runtime/src/js/pgadmin.js b/runtime/src/js/pgadmin.js index 4a36b1f95..0f3a3ad13 100644 --- a/runtime/src/js/pgadmin.js +++ b/runtime/src/js/pgadmin.js @@ -208,6 +208,17 @@ function launchPgAdminWindow() { // Set zoom in and out events. misc.setZoomEvents(); + // Workaround to fix increasing window size. + // https://github.com/nwjs/nw.js/issues/7973 + pgadminWindow.on('close', function () { + // Resize Window + resizeHeightBy = pgadminWindow.window.outerHeight - pgadminWindow.window.innerHeight; + pgadminWindow.resizeBy(0, -resizeHeightBy); + // Remove 'close' event handler, and then close window + pgadminWindow.removeAllListeners('close'); + pgadminWindow.close() + }); + pgadminWindow.on('closed', function () { misc.cleanupAndQuitApp(); });