From 0ebb250164cb17a980724f0cf8935c81e12909b9 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Wed, 25 Jun 2014 12:42:30 -0400 Subject: [PATCH] Minor optimization --- program/js/treelist.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/js/treelist.js b/program/js/treelist.js index 8773cb8..7ff9d75 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -807,8 +807,8 @@ 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]'); -- Gitblit v1.9.1