summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-06-26 12:33:14 +0200
committerAleksander Machniak <alec@alec.pl>2014-06-26 12:33:14 +0200
commit734ae968967dde2843e677109be265692272580e (patch)
tree3d82dbd59fd80486b81ac480fdc2c3353fbc757e /program/js
parentc5f06896d4db5f2479b5988cb2cea6ef0fa80cad (diff)
parente62d6964231613b4fb1628551c2e3f1cde78e1bb (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/js')
-rw-r--r--program/js/treelist.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 7ff9d75bf..b2d838e13 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -226,15 +226,21 @@ function rcube_treelist_widget(node, p)
function select(id)
{
if (selection) {
- id2dom(selection).removeClass('selected').removeAttr('aria-selected');
+ id2dom(selection, true).removeClass('selected').removeAttr('aria-selected');
+ if (search_active)
+ id2dom(selection).removeClass('selected').removeAttr('aria-selected');
selection = null;
}
- var li = id2dom(id);
+ var li = id2dom(id, true);
if (li.length) {
li.addClass('selected').attr('aria-selected', 'true');
selection = id;
// TODO: expand all parent nodes if collapsed
+
+ if (search_active)
+ id2dom(id).addClass('selected').attr('aria-selected', 'true');
+
scroll_to_node(li);
}