web: a resync keeps the Format sheet's selection drawn
Review 7 on #181. A resync replaces the EditorView, and the new one started with nothing kept, so with the sheet open the selection it acts on vanished. The selection is now carried across as Yjs relative positions, with the old absolute positions standing in where those resolve to nothing (a style chip makes the paragraph anew, and the refused change is dropped), and the new view draws it kept again. setInert's focus-back after a font wait now leaves the caret out while the sheet is open, as refocus() does; formatSheet is declared before setInert reads it. TestAResyncKeepsTheSelectionDrawn refuses the save of a size step and of a style chip made from the sheet (413, which resyncs) and checks the selection is still drawn over "Second paragraph.". Both failed with the re-dispatch taken out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+120
−17
fixtures/editor-entry.js+58 −5internal/docs/phone_sheet_browser_test.go+50 −0internal/docs/static/{editor.6e9033ae342b67cb.js => editor.470aeecd64ebb8df.js}+12 −12
fixtures/editor-entry.jsLoading diff…
internal/docs/phone_sheet_browser_test.goLoading diff…
internal/docs/static/{editor.6e9033ae342b67cb.js => editor.470aeecd64ebb8df.js}Loading diff…