summaryrefslogtreecommitdiff
path: root/program/js/list.js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-05-01 09:00:55 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-05-01 09:00:55 +0200
commit2ba491a0f93002424f7848c8a1726a03d857e381 (patch)
tree1561a33407cc14be5160709085b734e44b1ae300 /program/js/list.js
parente8bcf08c72a18b3bf396e6448d6658227ecb46f2 (diff)
Fix list focus in non-keyboard mode: restore old behavior
Diffstat (limited to 'program/js/list.js')
-rw-r--r--program/js/list.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/program/js/list.js b/program/js/list.js
index b4b775566..14dfde379 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -406,9 +406,15 @@ focus: function(e)
rcube_event.cancel(e);
// Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620)
- // It looks that window.focus() does the job for all browsers, but not Firefox (#1489058)
- // We now fix this by explicitly assigning focus to a dedicated link element
- this.focus_elem.focus();
+ if (this.focus_elem) {
+ // We now fix this by explicitly assigning focus to a dedicated link element
+ this.focus_elem.focus();
+ }
+ else {
+ // It looks that window.focus() does the job for all browsers, but not Firefox (#1489058)
+ $('iframe,:focus:not(body)').blur();
+ window.focus();
+ }
$(this.list).addClass('focus');