mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	fix focus on moving notes with keyboard
This commit is contained in:
		
							parent
							
								
									f8fb071a6f
								
							
						
					
					
						commit
						a33ac65fdf
					
				| @ -994,8 +994,6 @@ export default class NoteTreeWidget extends TabAwareWidget { | |||||||
|         const nextNode = activeNode ? (activeNode.getNextSibling() || activeNode.getPrevSibling() || activeNode.getParent()) : null; |         const nextNode = activeNode ? (activeNode.getNextSibling() || activeNode.getPrevSibling() || activeNode.getParent()) : null; | ||||||
|         const activeNotePath = activeNode ? treeService.getNotePath(activeNode) : null; |         const activeNotePath = activeNode ? treeService.getNotePath(activeNode) : null; | ||||||
| 
 | 
 | ||||||
|         console.log(activeNotePath, activeNodeFocused); |  | ||||||
| 
 |  | ||||||
|         const nextNotePath = nextNode ? treeService.getNotePath(nextNode) : null; |         const nextNotePath = nextNode ? treeService.getNotePath(nextNode) : null; | ||||||
|         const activeNoteId = activeNode ? activeNode.data.noteId : null; |         const activeNoteId = activeNode ? activeNode.data.noteId : null; | ||||||
| 
 | 
 | ||||||
| @ -1117,6 +1115,10 @@ export default class NoteTreeWidget extends TabAwareWidget { | |||||||
| 
 | 
 | ||||||
|             if (node) { |             if (node) { | ||||||
|                 node.setActive(true, {noEvents: true, noFocus: !activeNodeFocused}); |                 node.setActive(true, {noEvents: true, noFocus: !activeNodeFocused}); | ||||||
|  | 
 | ||||||
|  |                 if (activeNodeFocused) { | ||||||
|  |                     node.setFocus(true); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 // this is used when original note has been deleted and we want to move the focus to the note above/below
 |                 // this is used when original note has been deleted and we want to move the focus to the note above/below
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam