Aleksander Machniak
2015-07-17 7185736f399748b2cac709e2b61eedbc97bd33ed
Use jQuery's .on() instead of a deprecated .load()/.unload()
2 files modified
6 ■■■■ changed files
program/js/app.js 4 ●●●● patch | view | raw | blame | history
skins/classic/functions.js 2 ●●● patch | view | raw | blame | history
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);
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') {