From 0ebb250164cb17a980724f0cf8935c81e12909b9 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 25 Jun 2014 18:42:30 +0200 Subject: Minor optimization --- program/js/treelist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/js/treelist.js') 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]'); -- cgit v1.2.3