diff --git a/apps/client/src/widgets/type_widgets/type_widget.ts b/apps/client/src/widgets/type_widgets/type_widget.ts index 9cd8a64ab..31ecbf617 100644 --- a/apps/client/src/widgets/type_widgets/type_widget.ts +++ b/apps/client/src/widgets/type_widgets/type_widget.ts @@ -76,8 +76,10 @@ export default abstract class TypeWidget extends NoteContextAwareWidget { return; } - // Restore focus to the editor when switching tabs. - this.focus(); + // Restore focus to the editor when switching tabs, but only if the note tree is not already focused. + if (!document.activeElement?.classList.contains("fancytree-title")) { + this.focus(); + } } /**