Aleksander Machniak
2013-03-22 ad5cefeefc2dec285f9f9bb177e5bd190d0e6996
Better fix for IE9 issue with document.activeElement error (#1489008)
2 files modified
13 ■■■■ changed files
program/js/app.js 5 ●●●●● patch | view | raw | blame | history
program/js/common.js 8 ●●●● patch | view | raw | blame | history
program/js/app.js
@@ -178,6 +178,11 @@
      parent.rcmail.env.frame_lock = null;
    }
    // Makes that reference to document.activeElement do not throw
    // "unspecified error" in IE9 (#1489008)
    if (this.env.framed && bw.ie)
      document.documentElement.focus();
    // enable general commands
    this.enable_command('close', 'logout', 'mail', 'addressbook', 'settings', 'save-pref', 'compose', 'undo', 'about', 'switch-task', true);
program/js/common.js
@@ -743,12 +743,8 @@
      });
      // Do not blur currently focused element
      // Catch "unspecified error" in IE9 (#1489008)
      try {
        if (this != document.activeElement)
          elem.blur();
      }
      catch(e) {}
      if (this != document.activeElement)
        elem.blur();
    }
  });
};