From b64e22e92871f753185e40aa6c249729b3f1aee0 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 2 Sep 2016 13:59:01 +0200 Subject: [PATCH] Fix so folders list is scrolled to the selected folder on page load (#5424) --- CHANGELOG | 1 + program/js/treelist.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 3e43ff068c4..416ed4e97ac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ CHANGELOG Roundcube Webmail - Fix bug where folder creation could fail if personal namespace contained more than one entry (#5403) - Fix error causing empty INBOX listing in Firefox when using an URL with user:password specified (#5400) - Fix PHP warning when handling shared namespace with empty prefix (#5420) +- Fix so folders list is scrolled to the selected folder on page load (#5424) RELEASE 1.2.1 ------------- diff --git a/program/js/treelist.js b/program/js/treelist.js index bcbfeebae26..454309e4ad8 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -110,6 +110,11 @@ function rcube_treelist_widget(node, p) else update_data(); + // scroll to the selected item + if (selection) { + scroll_to_node(id2dom(selection, true)); + } + container.attr('role', 'tree') .on('focusin', function(e) { // TODO: only accept focus on virtual nodes from keyboard events