diff --git a/src/public/app/widgets/containers/ribbon_container.js b/src/public/app/widgets/containers/ribbon_container.js index 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 {