summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-06-23 10:48:45 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-06-23 10:48:45 +0200
commit0c9fc953b0ba0f0ac3a9d37fe8e8f92f0c34688e (patch)
tree5b865430c6dc228c5baeaaf98a2e9523f64aa5ab /program/js
parentb0aee4eb4205365e19a98729ca467bfec4fbea6f (diff)
Fix keyboard navigation with nested link element in treelist nodes
Diffstat (limited to 'program/js')
-rw-r--r--program/js/treelist.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 99d1dce87..3b9454391 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -771,19 +771,19 @@ function rcube_treelist_widget(node, p)
next = li[mod](), limit, parent;
if (dir > 0 && !from_child && li.children('ul[role=group]:visible').length) {
- li.children('ul').children('li:first').children('a:first').focus();
+ li.children('ul').children('li:first').find('a:first').focus();
}
else if (dir < 0 && !from_child && next.children('ul[role=group]:visible').length) {
- next.children('ul').children('li:last').children('a:last').focus();
+ next.children('ul').children('li:last').find('a:first').focus();
}
- else if (next.length && next.children('a:first')) {
- next.children('a:first').focus();
+ else if (next.length && next.find('a:first')) {
+ next.find('a:first').focus();
}
else {
parent = li.parent().closest('li[role=treeitem]');
if (parent.length)
if (dir < 0) {
- parent.children('a:first').focus();
+ parent.find('a:first').focus();
}
else {
focus_next(parent, dir, true);