summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/js/app.js3
-rw-r--r--program/js/common.js7
-rw-r--r--program/js/treelist.js8
-rw-r--r--program/localization/en_US/labels.inc1
-rw-r--r--skins/larry/ui.js4
5 files changed, 17 insertions, 6 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 53eaa4aa8..9c2acfc55 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1669,6 +1669,9 @@ function rcube_webmail()
var target = e.target || {},
keyCode = rcube_event.get_keycode(e);
+ // save global reference for keyboard detection on click events in IE
+ rcube_event._last_keyboard_event = e;
+
if (e.keyCode != 27 && (!this.menu_keyboard_active || target.nodeName == 'TEXTAREA' || target.nodeName == 'SELECT')) {
return true;
}
diff --git a/program/js/common.js b/program/js/common.js
index 5ac4febce..f4446c21c 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -31,7 +31,6 @@ var CONTROL_KEY = 1;
var SHIFT_KEY = 2;
var CONTROL_SHIFT_KEY = 3;
-
/**
* Default browser check class
* @constructor
@@ -287,8 +286,10 @@ cancel: function(evt)
is_keyboard: function(e)
{
return e && (
- (e.mozInputSource && e.mozInputSource == e.MOZ_SOURCE_KEYBOARD) ||
- (!e.pageX && (e.pageY || 0) <= 0 && !e.clientX && (e.clientY || 0) <= 0)
+ (e.pointerType !== undefined && e.pointerType !== 'mouse') || // IE 11+
+ (e.mozInputSource && e.mozInputSource == e.MOZ_SOURCE_KEYBOARD) || // Firefox
+ (!e.pageX && (e.pageY || 0) <= 0 && !e.clientX && (e.clientY || 0) <= 0) || // others
+ (bw.ie && rcube_event._last_keyboard_event && rcube_event._last_keyboard_event.target == e.target) // hack for IE <= 10
);
},
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 958ae81e2..cce4d17fd 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -747,10 +747,16 @@ function rcube_treelist_widget(node, p)
if (li.length) {
id = dom2id(li);
node = indexbyid[id];
- if (node && node.children.length)
+ if (node && node.children.length && node.collapsed != (keyCode == 37))
toggle(id, rcube_event.get_modifier(e) == SHIFT_KEY); // toggle subtree
}
return false;
+
+ case 9: // Tab
+ // jump to last/first item to move focus away from the treelist widget by tab
+ var limit = rcube_event.get_modifier(e) == SHIFT_KEY ? 'first' : 'last';
+ container.find('li[role=treeitem]:has(a)')[limit]().find('a:'+limit).focus();
+ break;
}
return true;
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index e7d385fe6..5a1f2fca0 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -586,6 +586,7 @@ $labels['chinese'] = 'Chinese';
$labels['arialabeltopnav'] = 'Window control';
$labels['arialabeltasknav'] = 'Application tasks';
$labels['arialabeltoolbar'] = 'Application toolbar';
+$labels['arialabelactivetask'] = 'Active task';
$labels['arialabelmessagessearchfilter'] = 'Email listing filter';
$labels['arialabelmailsearchform'] = 'Email message search form';
$labels['arialabelcontactsearchform'] = 'Contacts search form';
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 47183f73b..c84375051 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -327,7 +327,7 @@ function rcube_mail_ui()
if ($('option:selected', this).val() != '')
title = $('option:selected', this).text();
- var overlay = $('<a class="menuselector"><span class="handle">' + title + '</span></a>')
+ var overlay = $('<a class="menuselector" tabindex="-1"><span class="handle">' + title + '</span></a>')
.css('position', 'absolute')
.offset(select.position())
.insertAfter(select);
@@ -339,7 +339,7 @@ function rcube_mail_ui()
// re-set original select width to fix click action and options width in some browsers
select.width(overlay.width())
- .change(function() {
+ .on(bw.mz ? 'change keyup' : 'change', function() {
var val = $('option:selected', this).text();
$(this).next().children().text(val);
});