oficina / docs Public

web: a tap that closes the Format sheet leaves the caret where it tapped

Fable's follow-up D on #181. A tap in the document closes the sheet on
the editor's focusin, and the editor dropped the kept selection at once,
before ProseMirror had read the tap from the page, so the old selection
was written back over it: the caret was not where the person tapped.
When the editor already has focus as the sheet closes (a tap did it),
the kept selection now goes a moment later, after that read, and the
document is not refocused.

TestATapInTheDocumentClosesTheSheet taps just after "First" and checks
the caret is there (offset 5, collapsed, in the first paragraph). It
failed before (the second paragraph still selected).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 8a59e174a990f16bf01798883af375614045f15b parent f8be2dd
3 files changed, +36 −12
  • fixtures/editor-entry.js +10 −0
  • internal/docs/phone_sheet_browser_test.go +15 −1
  • internal/docs/static/{editor.cbd2f10270dbb05d.js => editor.fe1db7ee4d4551b0.js} +11 −11
fixtures/editor-entry.js

Loading diff…

internal/docs/phone_sheet_browser_test.go

Loading diff…

internal/docs/static/{editor.cbd2f10270dbb05d.js => editor.fe1db7ee4d4551b0.js}

Loading diff…