From 585ba81492c5cf1ebc3bc34db2645cc9e6cf4b42 Mon Sep 17 00:00:00 2001 From: Rahul Shirsat Date: Tue, 6 Apr 2021 15:26:25 +0530 Subject: [PATCH] Fixed sizing issue of help dialog for Query Tool and ERD Tool when open in the new browser tab. Fixes #6333 --- docs/en_US/release_notes_5_2.rst | 1 + web/pgadmin/browser/static/js/browser.js | 7 ++++++- .../erd/static/js/erd_tool/ui_components/BodyWidget.jsx | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_5_2.rst b/docs/en_US/release_notes_5_2.rst index 8cc269de3..33abee914 100644 --- a/docs/en_US/release_notes_5_2.rst +++ b/docs/en_US/release_notes_5_2.rst @@ -22,6 +22,7 @@ Bug fixes | `Issue #6076 `_ - Fixed an issue where correct error not thrown while importing servers and JSON file has incorrect/insufficient keys. | `Issue #6293 `_ - Fixed an issue where the procedure creation is failed when providing the Volatility option. | `Issue #6327 `_ - Ensure that while comparing domains check function dependencies should be considered in schema diff. +| `Issue #6333 `_ - Fixed sizing issue of help dialog for Query Tool and ERD Tool when open in the new browser tab. | `Issue #6338 `_ - Added missing dependency 'xdg-utils' for the desktop packages in RPM and Debian. | `Issue #6344 `_ - Fixed cannot unpack non-iterable response object error when selecting any partition. | `Issue #6356 `_ - Mark the Apache HTTPD config file as such in the web DEB and RPM packages. diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index 67e977daf..4ffb5ee5a 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -907,7 +907,12 @@ define('pgadmin.browser', [ window.open(fullUrl, 'postgres_help'); } else if(type == 'dialog_help') { - window.open(url, 'pgadmin_help'); + if (pgWindow && pgWindow.default) { + pgWindow.default.open(url, 'pgadmin_help'); + } + else { + window.open(url, 'pgadmin_help'); + } } $('#live-search-field').focus(); }, diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx index ff8a9c798..b79252992 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx @@ -412,7 +412,12 @@ export default class BodyWidget extends React.Component { onHelpClick() { let url = url_for('help.static', {'filename': 'erd_tool.html'}); - window.open(url, 'pgadmin_help'); + if (this.props.pgWindow) { + this.props.pgWindow.open(url, 'pgadmin_help'); + } + else { + window.open(url, 'pgadmin_help'); + } } onLoadDiagram() {