Skip to content

Let a double tap on a control act twice, not zoom the page — no touch-action: manipulation anywhere today, so iOS Safari's double-tap zoom fires between two taps on the PDF zoom stepper and its kin #288

Open

Description

@bencode

Problem

On iPhone and iPad, rapidly tapping a control twice can zoom the whole page instead of acting twice. iOS Safari still double-tap-to-zoomes any element that does not opt out, and no style in the app sets touch-action: manipulation — the only touch-action anywhere is the deliberate none on the note embed's resize handle (ui-packages/web/src/features/reader/markdown-reader/style.module.scss:552); ui-packages/web/src/styles.css and every module stylesheet beside it are silent on it.

The natural trigger is the PDF zoom stepper: + and − step 0.1 across a 0.5–2.0 range (ui-packages/web/src/components/pdf-reader/pdf-toolbar.tsx:79-93), so going from 100% to a comfortable 150% is five quick taps on the same small button — exactly the cadence Safari reads as a double tap and answers with a page zoom, throwing the whole workspace layout off instead of stepping the zoom again. The same rapid-tap cadence hits the Files view buttons (ui-packages/web/src/features/resources/resource-panel.tsx:190-196), the tab strip and the conversation header.

The viewport is deliberately left pinnable (ui-packages/web/index.html:6-8, no user-scalable=no — pinch zoom must stay for low-vision readers), so the fix cannot be disabling zoom globally; it is telling iOS that taps on controls are taps.

Proposal

  • Set touch-action: manipulation on the app's interactive controls — globally for button and control-like elements in styles.css, alongside the existing button { transition: none } reduced-motion rule.
  • Leave the reading surfaces untouched, so double-tap and pinch keep working where a reader may want them on the document itself.

Goal

After this, two quick taps on the zoom stepper step the zoom twice, and the same is true of every control, on iPhone Safari and the home-screen app — the page never zooms as a side effect of tapping a control, while pinch zoom keeps working everywhere it does today.

Verification

grep -n "touch-action: manipulation" ui-packages/web/src/styles.css
pnpm check

Refs

Activity

  1. added
    enhancement
    source:scheduled
    on Oct 28, 2026
  2. bencode commented on Oct 29, 2026

    @bencode
    OwnerAuthor

    Posted by the scheduled issue-reviewer loop, independent of the authoring session.

    Audit at d05b6b6 — valid, stays open.

    Evidence check — every anchor verified:

    • grep -rn touch-action ui-packages/web/src/ → exactly one hit: features/reader/markdown-reader/style.module.scss:552 with none. Nothing anywhere sets manipulation.
    • components/pdf-reader/pdf-toolbar.tsx:79-93 — the stepper: zoom - 0.1 / zoom + 0.1, clamped 0.5–2.0; five taps from 100% to 150%, the exact cadence iOS Safari reads as a double tap.
    • styles.css:914-917 — the existing @media (prefers-reduced-motion: reduce) { button { transition: none } } block the proposal would sit beside.
    • index.html:6-8 — viewport has no user-scalable=no; pinch zoom is deliberately kept, so a global zoom-disable is rightly off the table.
    • features/resources/resource-panel.tsx:190-196 — the Files/Recent/Starred view buttons, the other rapid-tap surface named.

    Duplicate check (open + closed): none — #187 (closed) was input focus zoom fixed by 16px fields, a different mechanism; #276 is the overscroll side; #290 is zoom persistence. This one — double-tap zoom on controls — is untouched by any issue.

    Sensor: lint ✓; verify ✗ — fails at the grep "touch-action: manipulation" styles.css step, correctly failing while unimplemented. For a one-line CSS rule the presence anchor is proportionate; jsdom cannot test the gesture outcome.

    One implementation note: the resize handle's deliberate touch-action: none (markdown-reader:552) survives a global element-level manipulation on button — class specificity beats the element selector — so the two rules coexist without conflict; worth keeping both as they are.

  3. bencode commented on Nov 1, 2026

    @bencode
    OwnerAuthor

    Posted by the scheduled issue-reviewer loop, independent of the authoring session.

    Re-audit at d05b6b6 (HEAD unchanged since the last review) — valid, stays open. One correction and one scope confirmation below.

    Evidence re-verified: touch-action appears exactly once in src/ (markdown-reader/style.module.scss:552, none); the stepper steps ±0.1 clamped 0.5–2.0 (pdf-toolbar.tsx:75-93); the viewport keeps pinch zoom (index.html:6-8). Sensor: lint ✓, verify ✗ at the styles.css grep — correctly red; a presence anchor is proportionate for a CSS rule jsdom cannot exercise.

    Correction to my previous comment: its specificity argument ("class specificity beats the element selector") answers a conflict that cannot occur — the resize handle is a <span class="resizeHandle"> (embed-frame.tsx:80-88), so a global button { touch-action: manipulation } never applies to it. The coexistence conclusion stands (disjoint elements; and even on a button the module class would win), but for the disjointness reason, not specificity.

    Scope confirmation — the button-only rule covers every surface the issue names:

    • PDF zoom stepper ± and % reset: <button> (pdf-toolbar.tsx:75-93).
    • Files/Recent/Starred view toggles: <button> inside the resource-views fieldset (resource-panel.tsx:190-199).
    • Tab strip: Radix Tabs.Trigger, which renders a <button> (document-tab-bar/index.tsx:101-108); tab close buttons likewise.

    So the minimal element-scoped rule suffices; no [role="button"] or universal-selector broadening is needed for the named surfaces. (If a future non-button tap target shows the same double-tap zoom, that is a new surface, not a reason to broaden this rule.)

  4. bencode commented on Nov 6, 2026

    @bencode
    OwnerAuthor

    Re-audit — posted by the scheduled issue-reviewer loop, independent of the authoring session. Third pass; main is still d05b6b6 (pulled today, "Already up to date") — anchors re-opened fresh regardless.

  5. bencode commented on Nov 9, 2026

    @bencode
    OwnerAuthor

    Re-audit (fourth pass) — posted by the scheduled issue-reviewer loop, independent of the authoring session. main is still d05b6b6 ("Already up to date"); anchors re-opened — touch-action appears exactly once in src/ (markdown-reader/style.module.scss:552, none, on .resizeHandle); styles.css still carries no manipulation; the zoom stepper is still <button>s stepping ±0.1 (pdf-toolbar.tsx:75-93); the viewport still has no user-scalable (pinch zoom deliberately kept, index.html:6-8). Verdict: valid, keep open (unchanged).

    Checks new this pass:

    This one remains implementation-ready as scoped (one element-scoped rule beside the reduced-motion block; the 10-29→11-01 correction and button-scope confirmation stand); nothing further to decide.

  6. bencode commented on Nov 11, 2026

    @bencode
    OwnerAuthor

    Re-audit (fifth pass) — posted by the scheduled issue-reviewer loop, independent of the authoring session. main is still d05b6b6 ("Already up to date"); anchors re-opened — touch-action appears exactly once in src/ (markdown-reader/style.module.scss:552, none, on .resizeHandle); styles.css carries no manipulation (grep exits 1); the viewport keeps pinch zoom (index.html:6-8, no user-scalable). Verdict: valid, keep open (unchanged).

    Checks new this pass:

    Still implementation-ready as scoped after five passes: one element-scoped rule beside the reduced-motion block; the 10-29→11-01 correction (resize handle is a <span>) and the button-scope confirmation stand; nothing further to decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsource:scheduled

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions