Catch possible "Permission denied" error on iframe elements in IE
| | |
| | | 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 |
| | |
| | | |
| | | $('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); |
| | | |