mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	the node you start dragging should be included even if not selected
This commit is contained in:
		| @@ -583,13 +583,18 @@ export default class NoteTreeWidget extends TabAwareWidget { | ||||
|  | ||||
|     /** @return {FancytreeNode[]} */ | ||||
|     getSelectedOrActiveNodes(node = null) { | ||||
|         const notes = this.getSelectedNodes(true); | ||||
|         const nodes = this.getSelectedNodes(true); | ||||
|  | ||||
|         if (notes.length === 0) { | ||||
|             notes.push(node ? node : this.getActiveNode()); | ||||
|         // the node you start dragging should be included even if not selected | ||||
|         if (node && !nodes.find(n => n.key === node.key)) { | ||||
|             nodes.push(node); | ||||
|         } | ||||
|  | ||||
|         return notes; | ||||
|         if (nodes.length === 0) { | ||||
|             nodes.push(this.getActiveNode()); | ||||
|         } | ||||
|  | ||||
|         return nodes; | ||||
|     } | ||||
|  | ||||
|     async setExpandedStatusForSubtree(node, isExpanded) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user