Skip to content

[RTE] Focus fixes#5739

Open
nucleogenesis wants to merge 2 commits intolearningequality:unstablefrom
nucleogenesis:5720--focus-trappin
Open

[RTE] Focus fixes#5739
nucleogenesis wants to merge 2 commits intolearningequality:unstablefrom
nucleogenesis:5720--focus-trappin

Conversation

@nucleogenesis
Copy link
Member

Summary

  • Focus the rich text editor when tool modals are closed (link, image, formula editor modals)
  • Focus the rich text editor when clicking "new question" and opening a new editor input

References

Closes #5720

AI usage

Claude was consulted for assistance throughout

nucleogenesis and others added 2 commits March 3, 2026 14:31
Add autofocus prop to TipTapEditor, threaded through to the TipTap
Editor constructor. AssessmentItemEditor sets shouldAutofocusQuestion
when it mounts with an empty question (i.e. a newly created one),
which passes autofocus=true to the TipTapEditor so the ProseMirror
view receives focus as soon as it initializes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rich text editor: fix focus trapping and focus on modal close

1 participant