Fixed an issue of the pgAdmin window size increasing each time it was reopened. #6464

This commit is contained in:
Akshay Joshi 2024-05-07 17:35:03 +05:30
parent e5f2506663
commit 9edc1d225e
2 changed files with 14 additions and 0 deletions

View File

@ -21,11 +21,14 @@ New features
************
| `Issue #7192 <https://github.com/pgadmin-org/pgadmin4/issues/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 <https://github.com/pgadmin-org/pgadmin4/issues/7411>`_ - Enhance the Delete dialog by highlighting the names of the objects to be deleted in bold.
Housekeeping
************
| `Issue #7419 <https://github.com/pgadmin-org/pgadmin4/issues/7419>`_ - Upgrade react-table from v7 to v8.
Bug fixes
*********
| `Issue #6464 <https://github.com/pgadmin-org/pgadmin4/issues/6464>`_ - Fixed an issue of the pgAdmin window size increasing each time it was reopened.

View File

@ -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();
});