diff --git a/docs/en_US/release_notes_4_10.rst b/docs/en_US/release_notes_4_10.rst index bbb25b6f3..b557148c3 100644 --- a/docs/en_US/release_notes_4_10.rst +++ b/docs/en_US/release_notes_4_10.rst @@ -13,3 +13,5 @@ New features Bug fixes ********* + +| `Bug #4403 `_ - Ensure the browser close confirmation is only shown when closing a Query Tool which is running in a separate browser tab. \ No newline at end of file diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index ef468f63a..8bf041f68 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -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();