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

pull/88/head
Aleksander Machniak 11 years ago
parent af98eb046f
commit fb2f066370

@ -634,8 +634,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

@ -244,8 +244,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