Block selection shows only the block tint (#397) #585

Closed
kayg wants to merge 0 commits from issue/397-no-text-sel into dev
Owner

Fixes the text-selection paint under a picked block (#397).

Root cause: iOS paints the page's selection natively (UIKit) when the editor has the keyboard and ignores ::selection; the app only hid CodeMirror's own layers. Fix: while blocks are picked and the editor is focused, its selection is a caret; the pick lives in picked and the app's block list.

Before/after crops: see the comment on #397.

Tests

  • new e2e/block-no-text-sel.spec.ts: swipe (390), Esc and Vim V (1440), chromium and webkit, light and dark: no visible .cm-selectionBackground in picked blocks, no handles, page selection a caret with the editor focused on the phone (or ::selection clear), block bar still shown, pixel check that past each row's text only the tint colour shows. It fails on dev (caret check) and passes here.
  • touch-select updated: the block may be held as a caret.
  • tint, touch-select, vim, editor, bar-* on chromium/webkit 390 and 1440: 70, 67, 49, 46 passed; new spec included.
  • svelte-check 0 errors, editor vitest 186/186, tsc clean.
  • iOS simulator: before shows the rectangles, after does not (see #397).

Selection geometry (circles, slide) is untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk

Fixes the text-selection paint under a picked block (#397). **Root cause:** iOS paints the page's selection natively (UIKit) when the editor has the keyboard and ignores `::selection`; the app only hid CodeMirror's own layers. **Fix:** while blocks are picked and the editor is focused, its selection is a caret; the pick lives in `picked` and the app's block list. Before/after crops: see the comment on #397. **Tests** - new `e2e/block-no-text-sel.spec.ts`: swipe (390), Esc and Vim V (1440), chromium and webkit, light and dark: no visible `.cm-selectionBackground` in picked blocks, no handles, page selection a caret with the editor focused on the phone (or `::selection` clear), block bar still shown, pixel check that past each row's text only the tint colour shows. It fails on dev (caret check) and passes here. - `touch-select` updated: the block may be held as a caret. - tint, touch-select, vim, editor, bar-* on chromium/webkit 390 and 1440: 70, 67, 49, 46 passed; new spec included. - svelte-check 0 errors, editor vitest 186/186, tsc clean. - iOS simulator: before shows the rectangles, after does not (see #397). Selection geometry (circles, slide) is untouched. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Block selection shows only the block tint (#397)
Some checks failed
CI / server (pull_request) Successful in 26s
CI / web (pull_request) Failing after 48s
CI / rust (pull_request) Successful in 4m6s
5a52f3486f
On iOS with the keyboard up, UIKit paints the page's selection itself (darker, ragged
rectangles behind each line) and ignores ::selection, so the picked words showed as selected
text under the tint. While blocks are picked and the editor has the keyboard, the editor's
selection is now a caret; the pick lives on in the picked state and the app's block list.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Author
Owner

Landed in train AD, #586.

Train AD ran the full suite: fmt, clippy, workspace tests (505 passed, 0 failed), the build, svelte-check, and every Playwright project in parallel shards.

Failures, each checked:

  • glass:268 (chromium-1440) passed 5 of 5 when repeated.
  • trash:33 (webkit-1440) passed 5 of 5 when repeated.
  • tooltips:12 (webkit-390) is a known flake that predates this train.
  • swipe-rows:140/177/197 (webkit-390) fail about 1 in 10 here AND on plain dev (1d2d8ce, 2 of 55 failed), so they predate this train and are tracked separately.

Contents:

  • #583: iOS Return no longer inserts two line breaks (#582).
  • #585: block selection shows only the block tint (#397).
Landed in train AD, #586. Train AD ran the full suite: fmt, clippy, workspace tests (505 passed, 0 failed), the build, svelte-check, and every Playwright project in parallel shards. Failures, each checked: - `glass:268` (chromium-1440) passed 5 of 5 when repeated. - `trash:33` (webkit-1440) passed 5 of 5 when repeated. - `tooltips:12` (webkit-390) is a known flake that predates this train. - `swipe-rows:140/177/197` (webkit-390) fail about 1 in 10 here AND on plain dev (1d2d8ce, 2 of 55 failed), so they predate this train and are tracked separately. Contents: - #583: iOS Return no longer inserts two line breaks (#582). - #585: block selection shows only the block tint (#397).
kayg closed this pull request 2026-10-18 17:42:50 +00:00
Some checks failed
CI / server (pull_request) Successful in 26s
CI / web (pull_request) Failing after 48s
CI / rust (pull_request) Successful in 4m6s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!585
No description provided.