mirror of
https://github.com/9001/copyparty.git
synced 2025-08-19 09:52:21 -06:00
ensure selected item visible when toggling navpane mode
This commit is contained in:
parent
5345565037
commit
4d0c6a8802
|
@ -2825,7 +2825,13 @@ function th_onload(el) {
|
|||
|
||||
function tree_scrollto(e) {
|
||||
ev(e);
|
||||
var act = QS('#tree a.hl'),
|
||||
tree_scrolltoo('#treeul a.hl');
|
||||
tree_scrolltoo('#docul a.hl');
|
||||
}
|
||||
|
||||
|
||||
function tree_scrolltoo(q) {
|
||||
var act = QS(q),
|
||||
ul = act ? act.offsetParent : null;
|
||||
|
||||
if (!ul)
|
||||
|
@ -3367,6 +3373,7 @@ var treectl = (function () {
|
|||
ebi('docul').style.display = ya ? '' : 'none';
|
||||
ebi('treeul').style.display = ya ? 'none' : '';
|
||||
clmod(ebi('filetree'), 'on', ya);
|
||||
tree_scrollto();
|
||||
};
|
||||
ebi('filetree').onclick = function (e) {
|
||||
ev(e);
|
||||
|
|
Loading…
Reference in a new issue