diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-03-24 17:30:34 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-03-24 17:30:34 +0100 |
commit | 24e88e91f7ebac132fa356762b0cd544d42cef9f (patch) | |
tree | 3b99b6c2237fb26541a133f78405faffcddd5240 /program/js | |
parent | a26c031621410f030751eae404490a10498583d7 (diff) | |
parent | 7889c57b772dbf722639894bd572c767424c8b84 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 5 | ||||
-rw-r--r-- | program/js/common.js | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js index 0f1a72448..d194b7326 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -178,6 +178,11 @@ function rcube_webmail() 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', 'menu-open', 'menu-save', true); diff --git a/program/js/common.js b/program/js/common.js index f9e945c05..1075225b4 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -720,10 +720,12 @@ jQuery.fn.placeholder = function(text) { var elem = $(this); this.title = text; + // Try HTML5 placeholder attribute first if ('placeholder' in this) { - elem.attr('placeholder', text); // Try HTML5 placeholder attribute first + elem.attr('placeholder', text); } - else { // Fallback to Javascript emulation of placeholder + // Fallback to Javascript emulation of placeholder + else { this._placeholder = text; elem.blur(function(e) { if ($.trim(elem.val()) == "") @@ -740,7 +742,8 @@ jQuery.fn.placeholder = function(text) { elem[(active ? 'addClass' : 'removeClass')]('placeholder').attr('spellcheck', active); }); - if (this != document.activeElement) // Do not blur currently focused element + // Do not blur currently focused element + if (this != document.activeElement) elem.blur(); } }); |