activating next element in tree after deleting the tree node

This commit is contained in:
azivner 2017-08-27 10:33:12 -04:00
parent 001d91172a
commit a25f15c9ab

View file

@ -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();
}
});
}