Skip to content

fix(ocr): keep the text sheet at its step, selectable and draggable from the text - #899

Merged
farfromrefug merged 2 commits into
mainfrom
fix/896-edit-detected-text-sheet-size
Nov 26, 2026
Merged

farfromrefug merged 2 commits into
mainfrom
fix/896-edit-detected-text-sheet-size

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The OCR sheet went back to its first step after each re-render and a fling never reached the full step: PageSheetLayout spread $$restProps on the sheet and Svelte re-applies all of them when the slots change. It passes the props explicitly now, with dragToss={0.3} so a fling can skip steps.
  • Dragging the sheet from the text, the text selection and the edit/done switch rely on fixes in the text view and the sheet libraries (below): makeSelectable and its timers are removed, Done calls blur() (which also hides the keyboard).
  • On Android a text scrolls to its cursor when the sheet gets smaller, so a tap on the text made it jump after a drag. On the new dragStart event of the sheet the text loses its focus and its cursor goes to the first visible line.

Refs #896

Depends on (not released yet)

Bump the three packages once released, then rebuild natively (ui-textview declares new native usages).

Testing

  • svelte-check: 0 errors.
  • Checked on an Android emulator with the library changes swapped into the bundle: fling reaches full and stays, drag from the text moves the sheet with the text staying at its top, taps on Edit/Done register, long press selects text also after Edit then Done.
  • Still to check: the keyboard hiding on Done and the edit mode with a keyboard (the emulator did not show one), iOS.

🤖 Generated with Claude Code

farfromrefug and others added 2 commits November 26, 2026 09:51
…rom the text

- `PageSheetLayout` spread `$$restProps` on the sheet: svelte re-applies all of them on each
  re-render of the slots, so the sheet went back to its first step after each change. Pass the
  props explicitly, and let a fling go further with `dragToss`.
- remove `makeSelectable` and its timers: read-only text stays selectable in ui-textview.
- call `blur()` on done, it also hides the keyboard.

Refs #896

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On Android a text scrolls to its cursor when the sheet gets smaller, so a tap on the text made it
jump after a drag. On `dragStart` clear its focus and put the cursor on the first visible line.

Refs #896

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug marked this pull request as ready for review November 26, 2026 09:49
@farfromrefug
farfromrefug merged commit d936966 into main Nov 26, 2026
@farfromrefug
farfromrefug deleted the fix/896-edit-detected-text-sheet-size branch November 26, 2026 09:50
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.

1 participant