diff options
-rw-r--r-- | skins/classic/functions.js | 9 | ||||
-rw-r--r-- | skins/larry/ui.js | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/skins/classic/functions.js b/skins/classic/functions.js index c59ea9bf8..23c69805c 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -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 diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 76485c11e..4485a21f8 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -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); |