fix(client): tree operations no longer working due to loss of focus

This commit is contained in:
Elian Doran 2025-07-17 14:05:19 +03:00
parent 0f129734ae
commit df3b9faf8d
No known key found for this signature in database

View File

@ -76,9 +76,11 @@ export default abstract class TypeWidget extends NoteContextAwareWidget {
return; return;
} }
// Restore focus to the editor when switching tabs. // 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(); this.focus();
} }
}
/** /**
* {@inheritdoc} * {@inheritdoc}