web: the Format sheet blurs before it draws the kept selection
Review 3 on #181. Opening the sheet drew the kept selection and then blurred, so mid-composition (Gboard, a Japanese or Chinese input method) the caret widget could land inside the words being composed. Now the editor blurs first, which ends a composition, and draws the kept selection after; a composition that outlasts the blur is waited for (compositionend, then ProseMirror's own short timer, or 500ms). TestAaMidCompositionWaitsForIt composes "かな" through CDP and opens the sheet mid-composition: the composition ends before the kept caret is drawn and the words land once. It is a guard, not a reproduction: Chromium's ProseMirror holds a decoration's DOM until a composition ends, so the old order passes there too. Android Chrome was not available to check by hand.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+84
−12
fixtures/editor-entry.js+25 −1internal/docs/phone_sheet_browser_test.go+48 −0internal/docs/static/{editor.117990f5f1de95bd.js => editor.a5538a783eb48652.js}+11 −11
fixtures/editor-entry.jsLoading diff…
internal/docs/phone_sheet_browser_test.goLoading diff…
internal/docs/static/{editor.117990f5f1de95bd.js => editor.a5538a783eb48652.js}Loading diff…