Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix focusing ribbon tabs when using keyboard navigation on the tree
zadam4c93334d9085
diff --git a/src/public/app/widgets/containers/ribbon_container.js b/src/public/app/widgets/containers/ribbon_container.jsindex 6cd4db53e6..0d821f6728 100644--- a/src/public/app/widgets/containers/ribbon_container.js+++ b/src/public/app/widgets/containers/ribbon_container.js@@ -188,10 +188,12 @@ export default class RibbonContainer extends NoteContextAwareWidget {if (activeChild && (refreshActiveTab || !wasAlreadyActive)) {const handleEventPromise = activeChild.handleEvent('noteSwitched', {noteContext: this.noteContext, notePath: this.notePath});- if (handleEventPromise) {- handleEventPromise.then(() => activeChild.focus?.());- } else {- activeChild.focus?.();+ if (refreshActiveTab) {+ if (handleEventPromise) {+ handleEventPromise.then(() => activeChild.focus?.());+ } else {+ activeChild.focus?.();+ }}}} else {