mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
set opener as early as possible for framework popups
This commit is contained in:
parent
7f4f340efd
commit
3f8acc1fd1
@ -43,6 +43,20 @@
|
||||
var start_time = (new Date).getTime();
|
||||
if(typeof console != "undefined" && console.timeline) console.timeline("egw");
|
||||
|
||||
// set opener as early as possible for framework popups (not real popups)
|
||||
if (!window.opener && window.parent !== window)
|
||||
{
|
||||
try {
|
||||
if (window.parent.framework && typeof window.parent.framework.popup_idx == 'function' &&
|
||||
window.parent.framework.popup_idx.call(window.parent.framework, window) !== undefined)
|
||||
{
|
||||
window.opener = window.parent;
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
// ignore SecurityError exception if opener is different security context / cross-origin
|
||||
}
|
||||
}
|
||||
// Flag for if this is opened in a popup
|
||||
var popup = (window.opener != null);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user