same story tutorial popup: ignore security exception if window.top is in a different security context

eg. because SiteMgr contact-form is running in an iframe
This commit is contained in:
Ralf Becker 2017-03-08 14:25:52 +01:00
parent 461b2e3e0a
commit ecf001fe06

View File

@ -319,6 +319,7 @@
{ {
window.scrollTo(0, 1); window.scrollTo(0, 1);
} }
try {
// Open tutorial popup with an introduction video about egroupware // Open tutorial popup with an introduction video about egroupware
if (window.framework === window.top.framework && typeof et2_dialog != 'undefined' && if (window.framework === window.top.framework && typeof et2_dialog != 'undefined' &&
!egw.preference('egw_tutorial_noautoload', 'common') && !egw.preference('egw_tutorial_noautoload', 'common') &&
@ -349,6 +350,10 @@
{}, buttons, et2_dialog.QUESTION_MESSAGE, undefined, egw(window)); {}, buttons, et2_dialog.QUESTION_MESSAGE, undefined, egw(window));
}, this); }, this);
} }
}
catch(e) {
// ignore SecurityError exception if top is different security context / cross-origin
}
}); });
}); });