Improvement for 'beforeunload' event, bind the event only from where it is required.

This commit is contained in:
Aditya Toshniwal
2019-04-22 11:30:33 +05:30
committed by Akshay Joshi
parent 94e1820ccd
commit 05ae330030
3 changed files with 26 additions and 19 deletions

View File

@@ -1572,6 +1572,8 @@ define([
});
this.panels = [];
pgBrowser.bind_beforeunload();
// Below code will be executed for indirect debugging
// indirect debugging - 0 and for direct debugging - 1
if (trans_id != undefined && !debug_type) {

View File

@@ -552,6 +552,8 @@ 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.