Prevent IE 9/10 errors

Both IE 9 & 10 generate a "SCRIPT70: Permission denied" when looping through the parents in the CMS. This happens after data has been edited in a UploadField iframe (eg: submitted Title change), followed by a click on any SiteTree link.
This commit is contained in:
Ralph Slooten 2013-07-03 17:55:40 +12:00 committed by Will Rossiter
parent 4ee38910cd
commit bdfcee7801

View File

@ -302,7 +302,10 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
if (!source) return;
var parent = source;
while (parent && parent.nodeType == 1) parent = parent.parentNode;
try {
while (parent && parent.nodeType == 1) parent = parent.parentNode;
}
catch(err) {}
if (!parent) $(source).unbind().remove();
});