mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
better behavior of activateNote frontend script
This commit is contained in:
@@ -40,9 +40,13 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
this.activateNote = async (notePath, noteLoadedListener) => {
|
||||
await treeService.activateNote(notePath, noteLoadedListener);
|
||||
await treeService.activateNote(notePath, async () => {
|
||||
await treeService.scrollToActiveNote();
|
||||
|
||||
await treeService.scrollToActiveNote();
|
||||
if (noteLoadedListener) {
|
||||
noteLoadedListener();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user