Skip to content

fix: ensure editor receives focus after creating a new note#90

Merged
j4rviscmd merged 1 commit intomainfrom
fix/editor-focus-fix
Mar 27, 2026
Merged

fix: ensure editor receives focus after creating a new note#90
j4rviscmd merged 1 commit intomainfrom
fix/editor-focus-fix

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Blur the "+" button before invoking onNewNote so it no longer holds browser focus after a new note is created
  • Change focusEditor in useCursorMemory to use a double requestAnimationFrame, ensuring the ProseMirror view has fully settled before focusing the editor

Test plan

  • Click the "+" button to create a new note and verify the editor receives focus
  • Switch between existing notes from the sidebar and verify focus still works
  • Restart the app and verify cursor position restoration and focus work correctly
  • Hide/show the window and verify focus behavior is unchanged

🤖 Generated with Claude Code

Blur the "+" button before creating a note so it no longer holds
browser focus, and use a double requestAnimationFrame in focusEditor
to guarantee the ProseMirror view has settled before focusing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the bug Something isn't working label Mar 27, 2026
@j4rviscmd j4rviscmd merged commit c216da3 into main Mar 27, 2026
2 checks passed
@j4rviscmd j4rviscmd deleted the fix/editor-focus-fix branch March 27, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant