Use jQuery's .on() instead of a deprecated .load()/.unload()
| | |
| | | .bind('mouseup', body_mouseup) |
| | | .bind('keydown', function(e){ return ref.doc_keypress(e); }); |
| | | |
| | | $('iframe').load(function(e) { |
| | | $('iframe').on('load', function(e) { |
| | | try { $(this.contentDocument || this.contentWindow).on('mouseup', body_mouseup); } |
| | | catch (e) {/* catch possible "Permission denied" error in IE */ } |
| | | }) |
| | |
| | | } |
| | | }, 5000); |
| | | |
| | | $(window).unload(function() { |
| | | $(window).on('unload', function() { |
| | | // remove copy from local storage if compose screen is left after warning |
| | | if (!ref.env.server_error) |
| | | ref.remove_compose_data(ref.env.compose_id); |
| | |
| | | update_quota(rcmail.env.quota_content); |
| | | rcmail.addEventListener('setquota', update_quota); |
| | | |
| | | $('iframe').load(iframe_events) |
| | | $('iframe').on('load', iframe_events) |
| | | .contents().mouseup(function(e) { rcmail_ui.body_mouseup(e); }); |
| | | |
| | | if (rcmail.env.task == 'mail') { |