oficina / docs Public

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>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 71bf938f33a9c6dbfea5a3ca01868bf2df4b3f3e parent d2584e3
3 files changed, +120 −17
  • fixtures/editor-entry.js +58 −5
  • internal/docs/phone_sheet_browser_test.go +50 −0
  • internal/docs/static/{editor.6e9033ae342b67cb.js => editor.470aeecd64ebb8df.js} +12 −12
fixtures/editor-entry.js

Loading diff…

internal/docs/phone_sheet_browser_test.go

Loading diff…

internal/docs/static/{editor.6e9033ae342b67cb.js => editor.470aeecd64ebb8df.js}

Loading diff…