Use jQuery's .on() instead of a deprecated .load()/.unload()

pull/287/head
Aleksander Machniak 9 years ago
parent 843643b1bd
commit 7185736f39

@ -592,7 +592,7 @@ function rcube_webmail()
.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 */ }
})
@ -3967,7 +3967,7 @@ function rcube_webmail()
}
}, 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);

@ -1008,7 +1008,7 @@ function rcube_init_mail_ui()
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') {

Loading…
Cancel
Save