From df3b9faf8d34b016f9f0a8999c90e2b05fc4ac5e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 17 Jul 2025 14:05:19 +0300 Subject: [PATCH] fix(client): tree operations no longer working due to loss of focus --- apps/client/src/widgets/type_widgets/type_widget.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); + } } /**