From 7185736f399748b2cac709e2b61eedbc97bd33ed Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 17 Jul 2015 18:56:25 +0200 Subject: [PATCH] Use jQuery's .on() instead of a deprecated .load()/.unload() --- program/js/app.js | 4 ++-- skins/classic/functions.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index b97051e3c..5238e5846 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -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); diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 922700161..f179a3de2 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -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') {