From 60fd3c8b5f112457f595fe0ac250701413d2f7fa Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 28 Mar 2013 15:15:26 -0400
Subject: [PATCH] Fix keyboard events on list widgets in Internet Explorer (#1489025) - It was a regression in fix for #1489008
---
program/js/list.js | 1 +
CHANGELOG | 4 ++++
program/js/common.js | 7 ++++---
program/js/app.js | 5 -----
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 34a3fd6..7940e5a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix keyboard events on list widgets in Internet Explorer (#1489025)
+
+RELEASE 0.9-rc2
+---------------
- Fix security issue in save-pref command
- Remove sig_above configuration option, use reply_mode only (#1489001)
- Refresh current folder in opener window after draft save or message sent (#1488997)
diff --git a/program/js/app.js b/program/js/app.js
index 8e5bc54..5d6d2c1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -178,11 +178,6 @@
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);
diff --git a/program/js/common.js b/program/js/common.js
index 1075225..f7c0a75 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -717,7 +717,7 @@
// 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 @@
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();
}
});
diff --git a/program/js/list.js b/program/js/list.js
index 660b74d..6b8bb39 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -687,6 +687,7 @@
this.shift_start = null;
this.last_selected = id;
+ this.list.focus();
},
--
Gitblit v1.9.1