summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-06-25 18:42:30 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-06-25 18:42:30 +0200
commit0ebb250164cb17a980724f0cf8935c81e12909b9 (patch)
treee4cb11344d5e96492b70972fdab871acf7d672ad /program
parentf0e4d2fd14afac5b02a159d356d1f3addb6e1107 (diff)
Minor optimization
Diffstat (limited to 'program')
-rw-r--r--program/js/treelist.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 8773cb884..7ff9d75bf 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -807,8 +807,8 @@ function rcube_treelist_widget(node, p)
else if (dir < 0 && !from_child && next.children('ul[role=group]:visible').length) {
next.children('ul').children('li:last').find('a:first').focus();
}
- else if (next.length && next.find('a:first')) {
- next.find('a:first').focus();
+ else if (next.length && next.find('a:first').focus().length) {
+ // focused
}
else {
parent = li.parent().closest('li[role=treeitem]');