summaryrefslogtreecommitdiff
path: root/program/js/treelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/treelist.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);
}