mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	note activation from API will also scroll to it / focus
This commit is contained in:
		@@ -39,7 +39,11 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
 | 
				
			|||||||
     * @param {string} notePath (or noteId)
 | 
					     * @param {string} notePath (or noteId)
 | 
				
			||||||
     * @returns {Promise<void>}
 | 
					     * @returns {Promise<void>}
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    this.activateNote = treeService.activateNote;
 | 
					    this.activateNote = async (notePath, noteLoadedListener) => {
 | 
				
			||||||
 | 
					        await treeService.activateNote(notePath, noteLoadedListener);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        await treeService.scrollToActiveNote();
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Activates newly created note. Compared to this.activateNote() also refreshes tree.
 | 
					     * Activates newly created note. Compared to this.activateNote() also refreshes tree.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -881,5 +881,6 @@ export default {
 | 
				
			|||||||
    getNodeFromPath,
 | 
					    getNodeFromPath,
 | 
				
			||||||
    resolveNotePath,
 | 
					    resolveNotePath,
 | 
				
			||||||
    getSomeNotePath,
 | 
					    getSomeNotePath,
 | 
				
			||||||
    focusTree
 | 
					    focusTree,
 | 
				
			||||||
 | 
					    scrollToActiveNote
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -33,7 +33,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            <% include details/protected_session_password.ejs %>
 | 
					            <% include details/protected_session_password.ejs %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <div class="children-overview"></div>
 | 
					            <div class="children-overview hide-toggle"></div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div class="attribute-list">
 | 
					        <div class="attribute-list">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user