Catch possible "Permission denied" error on iframe elements in IE

pull/70/merge
Aleksander Machniak 12 years ago
parent 7dcf242dd9
commit c958452d09

@ -664,8 +664,13 @@ function rcmail_scroller(list, top, bottom)
function iframe_events()
{
// this==iframe
var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
try {
var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
rcube_event.add_listener({ element: doc, object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
}
catch (e) {
// catch possible "Permission denied" error in IE
};
};
// Abbreviate mailbox names to fit width of the container

@ -251,8 +251,13 @@ function rcube_mail_ui()
$('iframe').load(function(e){
// this = iframe
var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
$(doc).mouseup(body_mouseup);
try {
var doc = this.contentDocument ? this.contentDocument : this.contentWindow ? this.contentWindow.document : null;
$(doc).mouseup(body_mouseup);
}
catch (e) {
// catch possible "Permission denied" error in IE
};
})
.contents().mouseup(body_mouseup);

Loading…
Cancel
Save