Fix get_next() for case when the node is last in the tree branch

pull/6088/head
Aleksander Machniak 7 years ago
parent 5d26de4467
commit 4a5941c24b

@ -940,9 +940,16 @@ function rcube_treelist_widget(node, p)
return dom2id(child);
}
node = node.next();
if (node.length) {
return dom2id(node);
child = node.next();
if (child.length) {
return dom2id(child);
}
while ((node = node.parent('ul').parent('li')) && node.length) {
child = node.next();
if (child.length) {
return dom2id(child);
}
}
}
}

Loading…
Cancel
Save