mirror of
https://github.com/zadam/trilium.git
synced 2025-01-31 11:32:30 +08:00
activating next element in tree after deleting the tree node
This commit is contained in:
parent
001d91172a
commit
a25f15c9ab
1 changed files with 8 additions and 0 deletions
|
@ -23,7 +23,15 @@ const keybindings = {
|
|||
// remove from recent notes
|
||||
recentNotes = recentNotes.filter(note => note !== node.key);
|
||||
|
||||
let next = node.getNextSibling();
|
||||
if (!next) {
|
||||
next = node.getParent();
|
||||
}
|
||||
|
||||
node.remove();
|
||||
|
||||
// activate next element after this one is deleted so we don't lose focus
|
||||
next.setActive();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue