From 7185736f399748b2cac709e2b61eedbc97bd33ed Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 17 Jul 2015 12:56:25 -0400
Subject: [PATCH] Use jQuery's .on() instead of a deprecated .load()/.unload()
---
skins/classic/functions.js | 2 +-
program/js/app.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index b97051e..5238e58 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -592,7 +592,7 @@
.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 @@
}
}, 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 9227001..f179a3d 100644
--- a/skins/classic/functions.js
+++ b/skins/classic/functions.js
@@ -1008,7 +1008,7 @@
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') {
--
Gitblit v1.9.1