mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	target note is expanded after cloning into it
CTRL-V pastes into instead of after showing messages about clipboard operations
This commit is contained in:
		
							parent
							
								
									3c3117e22f
								
							
						
					
					
						commit
						eba00e6ff8
					
				| @ -472,18 +472,27 @@ const noteTree = (function() { | |||||||
|                     case 67: |                     case 67: | ||||||
|                         if (event.ctrlKey) { // Ctrl-C
 |                         if (event.ctrlKey) { // Ctrl-C
 | ||||||
|                             contextMenu.copy(node); |                             contextMenu.copy(node); | ||||||
|                             return false; | 
 | ||||||
|                         } |                             showMessage("Note copied into clipboard."); | ||||||
|                         break; | 
 | ||||||
|                     case 86: |  | ||||||
|                         if (event.ctrlKey) { // Ctrl-V
 |  | ||||||
|                             contextMenu.pasteAfter(node); |  | ||||||
|                             return false; |                             return false; | ||||||
|                         } |                         } | ||||||
|                         break; |                         break; | ||||||
|                     case 88: |                     case 88: | ||||||
|                         if (event.ctrlKey) { // Ctrl-X
 |                         if (event.ctrlKey) { // Ctrl-X
 | ||||||
|                             contextMenu.cut(node); |                             contextMenu.cut(node); | ||||||
|  | 
 | ||||||
|  |                             showMessage("Note cut into clipboard."); | ||||||
|  | 
 | ||||||
|  |                             return false; | ||||||
|  |                         } | ||||||
|  |                         break; | ||||||
|  |                     case 86: | ||||||
|  |                         if (event.ctrlKey) { // Ctrl-V
 | ||||||
|  |                             contextMenu.pasteInto(node); | ||||||
|  | 
 | ||||||
|  |                             showMessage("Note pasted from clipboard into current note."); | ||||||
|  | 
 | ||||||
|                             return false; |                             return false; | ||||||
|                         } |                         } | ||||||
|                         break; |                         break; | ||||||
|  | |||||||
| @ -127,6 +127,8 @@ router.put('/:childNoteId/clone-to/:parentNoteId', auth.checkApiAuth, async (req | |||||||
|         await sql.replace("notes_tree", noteTree); |         await sql.replace("notes_tree", noteTree); | ||||||
| 
 | 
 | ||||||
|         await sync_table.addNoteTreeSync(noteTree.note_tree_id, sourceId); |         await sync_table.addNoteTreeSync(noteTree.note_tree_id, sourceId); | ||||||
|  | 
 | ||||||
|  |         await sql.execute("UPDATE notes_tree SET is_expanded = 1 WHERE note_id = ?", [parentNoteId]); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     res.send({ |     res.send({ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner