Skip to content

fix: a finger holds, drags a slider and scrolls on iOS Safari - #27

Merged
adammharris merged 1 commit into
mainfrom
claude/unit-themes-menu-redesign-anu1mh
Nov 17, 2026
Merged

adammharris merged 1 commit into
mainfrom
claude/unit-themes-menu-redesign-anu1mh

Conversation

@adammharris

Copy link
Copy Markdown
Member

Found on the web gallery on iOS Safari. Safari sends no contextmenu for a long press and selects the text under the finger instead. It also sends every move of a touch to the element the touch started on.

Fixes

  • Holds: a hold in a browser whose host gave no sleep now uses the browser's own timer, so it fires while the finger is still down, on iOS too. Where the browser also sends contextmenu for the same press (Chrome on Android), nothing opens a second time (Hold::held).
  • No text selection: what a finger holds or drags selects no text and shows no iOS callout. That covers a hold's area, a context menu's, a tile, a table row, a slider, a switch, a segmented control, a chip, a button and a stepper.
  • Sliders: a slider follows a finger along its rail, reading each move against its own box, as well as by its stops. It sets touch-action: pan-y, so a vertical swipe still scrolls the page.
  • Gallery scroll demo: dragged by a finger or a held button, where before only the wheel and its scroll bar moved it.

Blitz

  • Holds: a Blitz host gives Unit a sleep (Diaryx does), so long presses already fired there.
  • Sliders: Blitz hit-tests each move rather than capturing a touch, so the per-stop path still works. The new position path is on top of it.
  • Text selection: the CSS lines are harmless if Blitz ignores them.

Checks

  • Simulated touch: Chromium emulating an iPhone 13, with touches sent over the DevTools protocol:
    • A hold fires.
    • A context menu and a file tile's menu open with no selection.
    • A slider drags from 0.4 to 0.99.
    • The scroll demo moves 100 px.
  • Not tested on real WebKit: only Chromium is installed here, so this checks the mechanics, not Safari itself.
  • Gate: cargo fmt --check, clippy (native and wasm32 web), and cargo test --workspace (73 library, 7 audit, 77 Blitz) pass on top of perf: a menu's step and a press draw only the controls they change #26.

Generated by Claude Code

Found on the web gallery on iOS Safari, which sends a long press as no
contextmenu and selects the text under the finger instead, and sends every
move of a touch to the element it went down on.

- A hold in a browser with no sleep from its host takes the browser's own
  timer, so it fires while the finger is still down there too. Where the
  browser also sends contextmenu for the same press (Chrome on Android),
  it opens nothing more (Hold::held).
- What a finger holds or drags (a hold's area, a context menu's, a tile, a
  table's row, a slider, a switch, a segmented control, a chip, a button,
  a stepper) selects no text and shows no callout.
- A slider follows a finger along its rail, reading the move against its
  own box, as well as by its stops; it leaves a vertical pan to the page.
- The gallery's scroll demo is dragged by a finger or a held button.
@adammharris
adammharris merged commit ea72bfc into main Nov 17, 2026
7 checks passed
@adammharris
adammharris deleted the claude/unit-themes-menu-redesign-anu1mh branch November 17, 2026 06:16
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