FIX for #5683: Address security warning in CMS when attempting to access <iframe> contents (Back-porting fix from PR #5163)

This commit is contained in:
Patrick Nelson 2016-06-12 17:26:36 -07:00
parent 39d1ef7a4b
commit f0d4951815

View File

@ -30,7 +30,11 @@
// because the panel is still open when the ajax edit form reloads.
var frame = $('.cms-container').find('iframe');
frame.each(function(index, iframe){
$(iframe).contents().off('click.ss-ui-action-tabset');
try {
$(iframe).contents().off('click.ss-ui-action-tabset');
} catch (e) {
console.warn('Unable to access iframe, possible https mis-match');
}
});
$(document).off('click.ss-ui-action-tabset');