Ensure the browser close confirmation is only shown when closing a Query Tool which is running in a separate browser tab. Fixes #4403

pull/25/head
Aditya Toshniwal 2019-06-27 10:37:50 -04:00 committed by Dave Page
parent 173b812b93
commit 2451db8797
2 changed files with 3 additions and 2 deletions

View File

@ -13,3 +13,5 @@ New features
Bug fixes
*********
| `Bug #4403 <https://redmine.postgresql.org/issues/4403>`_ - Ensure the browser close confirmation is only shown when closing a Query Tool which is running in a separate browser tab.

View File

@ -584,8 +584,6 @@ define('tools.querytool', [
};
});
pgBrowser.bind_beforeunload();
/* If the screen width is small and we hover over the Explain Options,
* the submenu goes behind the screen on the right side.
* Below logic will make it appear on the left.
@ -631,6 +629,7 @@ define('tools.querytool', [
* instead, a poller is set up who will check
*/
if(self.preferences.new_browser_tab) {
pgBrowser.bind_beforeunload();
setInterval(()=>{
if(window.opener.pgAdmin) {
self.reflectPreferences();