mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:26:08 +08:00 
			
		
		
		
	activating next element in tree after deleting the tree node
This commit is contained in:
		
							parent
							
								
									001d91172a
								
							
						
					
					
						commit
						a25f15c9ab
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -23,7 +23,15 @@ const keybindings = { | |||
|                     // remove from recent notes
 | ||||
|                     recentNotes = recentNotes.filter(note => note !== node.key); | ||||
| 
 | ||||
|                     let next = node.getNextSibling(); | ||||
|                     if (!next) { | ||||
|                         next = node.getParent(); | ||||
|                     } | ||||
| 
 | ||||
|                     node.remove(); | ||||
| 
 | ||||
|                     // activate next element after this one is deleted so we don't lose focus
 | ||||
|                     next.setActive(); | ||||
|                 } | ||||
|             }); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue