Fixed an issue where logout inactive session did not work when a new tab is opened from the already opened tab.

This commit is contained in:
Aditya Toshniwal 2020-01-31 11:20:45 +05:30 committed by Akshay Joshi
parent 02f9de5bdb
commit 75a3e92098

View File

@ -7,11 +7,16 @@
//
//////////////////////////////////////////////////////////////
let getWindowOpener = (opener) => {
return opener.opener && opener.opener.pgAdmin ? getWindowOpener(opener.opener) : opener;
};
let pgWindow = function() {
let pgWindow = null;
try {
if(window.opener && window.opener.pgAdmin) {
pgWindow = window.opener;
/* Windows can be opened at multiple levels */
pgWindow = getWindowOpener(window.opener);
} else if(window.parent && window.parent.pgAdmin){
pgWindow = window.parent;
} else if(window.top && window.top.pgAdmin){