mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
fix tree activation/focus after deleting node
This commit is contained in:
@@ -516,11 +516,15 @@ async function collapseTree(node = null) {
|
||||
node.visit(node => node.setExpanded(false));
|
||||
}
|
||||
|
||||
function focusTree() {
|
||||
$tree.find('.fancytree-container').focus();
|
||||
}
|
||||
|
||||
async function scrollToActiveNote() {
|
||||
const activeContext = noteDetailService.getActiveTabContext();
|
||||
|
||||
if (activeContext && activeContext.notePath) {
|
||||
$tree.find('.fancytree-container').focus();
|
||||
focusTree();
|
||||
|
||||
const node = await expandToNote(activeContext.notePath);
|
||||
|
||||
@@ -814,5 +818,6 @@ export default {
|
||||
expandToNote,
|
||||
getNodeFromPath,
|
||||
resolveNotePath,
|
||||
getSomeNotePath
|
||||
getSomeNotePath,
|
||||
focusTree
|
||||
};
|
||||
Reference in New Issue
Block a user