summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-03-28 20:13:39 +0100
committerAleksander Machniak <alec@alec.pl>2013-03-28 20:13:39 +0100
commit0c974b263d8fbd1f2ab3557b3b860442c0c277cd (patch)
tree3f55e3926045ff62dedaafc48cbd3d98b72b0633 /program/js/common.js
parent4da1abe93f4bcf73e87bee683a158b77ce7e021a (diff)
Fix keyboard events on list widgets in Internet Explorer (#1489025) - It was a regression in fix for #1489008
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 1075225b4..f7c0a7536 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -717,7 +717,7 @@ if (bw.ie) {
// jQuery plugin to emulate HTML5 placeholder attributes on input elements
jQuery.fn.placeholder = function(text) {
return this.each(function() {
- var elem = $(this);
+ var active = false, elem = $(this);
this.title = text;
// Try HTML5 placeholder attribute first
@@ -742,8 +742,9 @@ jQuery.fn.placeholder = function(text) {
elem[(active ? 'addClass' : 'removeClass')]('placeholder').attr('spellcheck', active);
});
- // Do not blur currently focused element
- if (this != document.activeElement)
+ // Do not blur currently focused element (catch exception: #1489008)
+ try { active = this == document.activeElement; } catch(e) {}
+ if (!active)
elem.blur();
}
});