mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	fix focusing ribbon tabs when using keyboard navigation on the tree
This commit is contained in:
		| @@ -188,12 +188,14 @@ export default class RibbonContainer extends NoteContextAwareWidget { | |||||||
|             if (activeChild && (refreshActiveTab || !wasAlreadyActive)) { |             if (activeChild && (refreshActiveTab || !wasAlreadyActive)) { | ||||||
|                 const handleEventPromise = activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath}); |                 const handleEventPromise = activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath}); | ||||||
|  |  | ||||||
|  |                 if (refreshActiveTab) { | ||||||
|                     if (handleEventPromise) { |                     if (handleEventPromise) { | ||||||
|                         handleEventPromise.then(() => activeChild.focus?.()); |                         handleEventPromise.then(() => activeChild.focus?.()); | ||||||
|                     } else { |                     } else { | ||||||
|                         activeChild.focus?.(); |                         activeChild.focus?.(); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |             } | ||||||
|         } else { |         } else { | ||||||
|             this.lastActiveComponentId = null; |             this.lastActiveComponentId = null; | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user