mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	scroll to current page after loading app
This commit is contained in:
		
							parent
							
								
									84faa41321
								
							
						
					
					
						commit
						262b02c1b2
					
				| @ -422,6 +422,10 @@ const noteTree = (function() { | ||||
| 
 | ||||
|                 if (startNotePath) { | ||||
|                     activateNode(startNotePath); | ||||
| 
 | ||||
|                     // looks like this this doesn't work when triggered immediatelly after activating node
 | ||||
|                     // so waiting a second helps
 | ||||
|                     setTimeout(scrollToCurrentNote, 1000); | ||||
|                 } | ||||
|                 else { | ||||
|                     showAppIfHidden(); | ||||
| @ -536,7 +540,7 @@ const noteTree = (function() { | ||||
|     $(document).bind('keydown', 'alt+c', collapseTree); | ||||
| 
 | ||||
|     function scrollToCurrentNote() { | ||||
|         const node = noteTree.getCurrentNode(); | ||||
|         const node = getCurrentNode(); | ||||
| 
 | ||||
|         if (node) { | ||||
|             node.makeVisible({scrollIntoView: true}); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner