Skip to content

spec(AST-094): a held finger does what the hold does, not a selection (FR41, DEC-9) - #8454

Merged
cixzhang merged 5 commits into
mainfrom
spec/ast094-touch-selection
Oct 26, 2026
Merged

cixzhang merged 5 commits into
mainfrom
spec/ast094-touch-selection

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

How does touch tell apart a tap, a long press that opens a menu, and an intentional text selection?

Existing authority searched

  • spec:AST-094 FR29 (DropdownMenu press timing and handoff), FR33 (ContextMenu under a held finger, lift), FR19 (coarse primary pointer only).
  • spec:AST-017 FR59: touch work leaves fine-pointer behavior alone.
  • feat(core): a held finger never starts text selection where its hold does something #8270 (open, vjeux): a press-scoped selection lock on every press-tracked touch control and row, with a recognizer opt-in; not on main.
  • Search terms: user-select, -webkit-touch-callout, selection lock, long press, text selection.

Decision

spec:AST-094 FR41 and DEC-9 (Cindy, 2026-10-25, D1 = a, D1.1, D1.2 = z):

  • A tap activates as today and never selects.
  • On an element whose hold does something (a long-press menu at FR29/FR33 timing, a stepper's hold-repeat, a slider thumb), the hold does that and selection start and the callout are suppressed for that press only, lifted at the lift or a cancel.
  • On anything whose hold does nothing (a checkbox row's label, plain text), a long press selects natively with the browser's handles.
  • Text on a menu element is not selectable by a long press, and the system adds no Copy item. Guidance, not system behavior: a caller offers a Copy action in its menu.
  • Keyboard, mouse, and assistive-technology selection are unchanged (AST-017 FR59).
  • No open questions remain.

Native evidence (public documentation)

  • UIKit: UIContextMenuInteraction presents a menu on a long press of the view it is attached to; text selection comes from UITextInteraction on text-input views, and a cell or control with a context menu offers copy as a menu action rather than starting a selection (e.g. Messages' Copy).
  • Android: a view's long click (View.OnLongClickListener, context menus) takes the long press when it handles it; text selection starts on a long press only in a TextView with textIsSelectable, and list items expose copy as a contextual action.

So the precedent is: the menu wins the long press on a menu element, and copying is a menu item.

Current-state impact

On main, a held finger on a touch control, row, or menu trigger can start a selection or the callout, and no shared press-scoped suppression exists. #8270 locks every press-tracked control; under FR41, controls whose hold does nothing (such as checkbox-row labels) keep native selection.

Rejected alternatives

  • A system Copy item; suppressing selection on every press-tracked control; a global lock.

Writing rubric results

  • R1 narration: none.
  • R2 research in the record: none; native evidence stays in this description.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge (CI lint)
  • Prettier
  • git diff --check

@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 26, 2026 12:30am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 26, 2026, 1:25 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current change has no visual or preview-producing scope. Visual checks are not applicable; preview links are not shown.

The exact-head preview is not available yet.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proposal waits on an engineering owner's decision: FR41 adds a new text-selection rule to spec:AST-094, and an engineering owner records whether it lands as written by commenting /approve-spec <full head SHA> on this pull request (the author may do so if they are an engineering owner), settling whether FR41's press-only hold should replace the always-on selection and callout block that ContextMenu triggers and DropdownMenu's default trigger carry today, and whether mouse keeps that block. Whatever the decision, these record fixes are needed:

  • The Current-state impact line says a menu trigger can start a selection or the callout today, but the ContextMenu trigger style and DropdownMenu's triggerPressable already set user-select: none and -webkit-touch-callout: none at all times.
  • The rubric reports R1 as none, yet FR41, the impact line, the verification row and OQ11 still narrate the proposal ("Proposed; pending owner decision", "FR41 proposes"), which an approved current record would keep.
  • "FR29's or FR33's timing" and "a row with actions" point at no defined timing or element; FR12 holds the context-menu long-press threshold.

[Automated review]

Comment on lines +460 to +462
- Under proposed FR41, a held finger on a touch control, a row, or a menu
trigger can start a text selection or the callout today; no shared,
press-scoped suppression exists.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says a held finger on a menu trigger can start a text selection or the callout today, but the ContextMenu trigger style (trigger in ContextMenu.tsx) and DropdownMenu's default trigger (triggerPressable in DropdownMenu.tsx) already set -webkit-touch-callout: none and user-select: none at all times, for every input. Could this line state that, name ContextMenu and DropdownMenu as affected, and could FR41 say whether its press-scoped hold replaces that always-on style under a finger while mouse keeps it?

### Text selection

- **FR41 — A held finger on a menu element opens the menu, not a selection.**
**Proposed; pending owner decision (OQ11, OQ12).** A tap activates as it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description reports R1 as none, but this marker, "Under proposed FR41" (line 460), "FR41 (proposed)" (line 517) and "FR41 proposes" (line 604) narrate the proposal. If this head is approved, a current record would carry a requirement that calls itself pending; the status can live in the pull request and its approval instead.

**Proposed; pending owner decision (OQ11, OQ12).** A tap activates as it
does today and never selects text. On an element that opens a menu on a long
press, such as a ContextMenu trigger or a row with actions, the long press
opens the menu at FR29's or FR33's timing and suppresses the browser's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR33 sets no timing, and FR29 opens DropdownMenu on press rather than on a long press; the context-menu long-press threshold is FR12's "measured values for context menus and menus". "A row with actions" (line 391) also names no element that opens a menu on a long press today; perhaps "a row the caller wraps in a ContextMenu"?

@cixzhang

cixzhang commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Posted by Cindy's agent on her behalf.

Cindy's decision on touch text selection:

  • A tap activates the control and never selects text.
  • A long press on an element whose hold does something (a long-press menu, a stepper's hold-repeat, a slider thumb, other hold-driven controls) does that action, with no selection or loupe.
  • A long press on anything without a hold action (plain text, a checkbox row's label) selects text natively, as today.
  • Text on such an element isn't selectable by a long press, and the system doesn't add a Copy item. The recommended pattern is for the caller to put a Copy action in its menu (guidance, not system behavior).

@cixzhang cixzhang changed the title spec(AST-094): proposed: a held finger on a menu element opens the menu, not a selection (FR41) spec(AST-094): a held finger does what the hold does, not a selection (FR41, DEC-9) Oct 25, 2026
@cixzhang
cixzhang force-pushed the spec/ast094-touch-selection branch from 52f0f30 to 615872e Compare October 25, 2026 22:35
cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
…lection locks per press

- attachTapHaptic: the hidden switch never keeps the focus. Where a
  label's activation focuses its control (Chromium), the focus goes on to
  the label's own control, or back where it was, so it never lands on an
  aria-hidden element.
- attachTapHaptic: a label that already has a control keeps it. The switch
  goes first, takes the label's activation (so a real tap plays) and hands
  the click on, so the control still toggles. A control that is itself a
  switch plays on its own, and a label tied by `for` is left as it is.
- gestureHostStyle sets only the touch-action. The callout and
  text-selection lock moves to holdSelectionStyle, which a host applies
  for one held press only, on an element whose hold does something
  (spec:AST-094 FR41, pending meta#8454); a mouse, a keyboard and assistive
  technology keep selecting (spec:AST-017 FR59).

The three new haptic tests fail on the previous head.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proposal waits on an engineering owner's decision: FR41 and DEC-9 add a new text-selection rule to spec:AST-094, and the decision posted as a comment is not tied to this head, so an engineering owner records whether they land as written by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), including that under a finger FR41 narrows the always-on selection and callout block that menu triggers, the menu surface and Slider's track carry today while a mouse keeps it. Whatever the decision, these record fixes are needed:

  • The Current-state impact bullet says a menu trigger can start a selection or the callout today, but ContextMenu's trigger style, DropdownMenu's triggerPressable and menu styles, and Slider's track already set user-select: none (the menus also -webkit-touch-callout: none) at all times, so it should say that and name the affected components.
  • "On anything whose hold does nothing … a long press selects natively" also covers parts that suppress selection on purpose, such as Avatar's content under component:Avatar FR1, while FR41's own verification row fails "a change to native selection elsewhere", so scoping it to labels and plain text resolves both.
  • "FR33's timing", "a row with actions" and "a stepper's hold-repeat" point at no defined timing or released behavior (FR12 holds the context-menu long-press threshold), and spec:AST-017 FR59 covers only the mouse part of FR41's last sentence.

[Automated review]

Comment on lines +463 to +465
- Under FR41, a held finger on a touch control, a row, or a menu
trigger can start a text selection or the callout today; no shared,
press-scoped suppression exists.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ContextMenu's trigger style (trigger in ContextMenu.tsx), DropdownMenu's triggerPressable and menu (dropdown) styles, and Slider's track (trackContainer) already set user-select: none (the menus also -webkit-touch-callout: none) at all times, for every input, so a menu trigger cannot start a selection or the callout today. Could this bullet say that, name component:ContextMenu, component:DropdownMenu and component:Slider as affected, and state that under a coarse primary pointer the press-scoped block replaces that always-on style while fine pointers keep it?

Comment on lines +395 to +397
adds no Copy item to a menu. On anything whose hold does nothing, such as a
checkbox row's label or plain text, a long press selects natively, with the
browser's handles. Keyboard, mouse, and assistive-technology selection are

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read literally, this also covers hold-free parts that suppress selection on purpose, such as Avatar's content (component:Avatar FR1: "A clipped content area … suppresses text selection") or Kbd, while the FR41 verification row fails "a change to native selection elsewhere". Perhaps: "On anything whose hold does nothing, the browser's own long-press behavior applies unchanged, so a label or plain text selects natively."

Comment on lines +390 to +391
does something, such as a ContextMenu trigger or a row with actions (a
long-press menu at FR29's or FR33's timing), a stepper's hold-repeat, or a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR33 sets no timing; the ContextMenu long-press threshold is FR12's "the measured values for context menus and menus". "A row with actions" and "a stepper's hold-repeat" also name behavior no Core component has (spec:AST-057's row actions are a swipe; NumberInput's steppers step once per click), so the verification row's row and stepper states have no subject; perhaps "a row the caller wraps in a ContextMenu", and drop the stepper or mark it as a future hold-repeat control.

cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
…s something (AST-094 FR41)

Per Cindy's selection decision (D1) and spec:AST-094 FR41 (meta#8454): the
blanket lock on every pressable goes. Text selection and the callout are
suppressed for one held press only on elements whose hold does something:
a long press (a menu, a hold-repeat) and a recognizer with
preventsTextSelection (a slider's thumb, a switch's or a segmented
control's drag), with a non-text input under the finger inside them.
Everything else, a press-tracked control or row and the document press
controller's surfaces included, keeps the browser's long-press selection;
a tap never selects. The document press controller no longer locks at all.

Tests: a hold on a plain pressable (attached, delegated, the press
controller's row, a pen) keeps native selection; a hold on a menu trigger
and on a pan that asks turns it off for the press; the browser proof checks
both in a real engine, and a checkbox inside a switch's drag versus one in
a plain row. The long press's lock also stands in for the permanent
long-press style once meta#8071's holdSelectionStyle change merges up.
@cixzhang
cixzhang force-pushed the spec/ast094-touch-selection branch from 615872e to ed47b9c Compare October 25, 2026 23:31
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec ed47b9c

@github-actions github-actions Bot added spec-auto-merge Auto-merge was enabled by the spec owner gate and removed needs:spec-owner-review Current knowledge records await owner approval labels Oct 25, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR41 and DEC-9 already carry an engineering owner's approval for this head, but three passages in spec:AST-094 need a text fix before this lands.

  • DEC-9 still says a long press on anything whose hold does nothing selects natively, while FR41 now limits that to labels and plain text and component:Avatar FR1 keeps Avatar's content unselectable, so DEC-9 should match FR41.
  • The current-state line says DropdownMenu's trigger already turns selection off, but only the built-in Button trigger gets triggerPressable; a trigger passed through renderTrigger gets the press model without it, so it is one of the controls FR41 changes and should be named there.
  • The FR41 verification row lists only hold states that are already suppressed at all times, so adding a long press on a caller-rendered DropdownMenu trigger would let it catch a missing press-scoped suppression.

After the fix, an engineering owner (the author may, as one) records the decision again with /approve-spec <full head SHA> on the new head.

[Automated review]

Comment on lines +617 to +618
and controls and Android's long clicks do. A long press on anything whose hold
does nothing selects natively, so labels stay selectable. Text on a menu

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEC-9 still says a long press on anything whose hold does nothing selects natively. FR41 (lines 396–399) now limits that to a label or plain text and leaves other elements to their own records, and component:Avatar FR1 keeps Avatar's content unselectable. Suggested: "A long press on a label or plain text whose hold does nothing selects natively; any other element follows its own record."

Comment on lines +465 to +467
- Under FR41: ContextMenu's trigger, DropdownMenu's trigger and menu, and
Slider's track already turn selection off at all times (the menus also the
callout), and that stays. A held finger on other rows and controls with a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only DropdownMenu's built-in Button gets triggerPressable (user-select: none, -webkit-touch-callout: none). A trigger passed through renderTrigger receives the press model's handlers but no suppression, so it is one of the controls FR41 changes. Suggested: "DropdownMenu's built-in trigger and menu" here, and naming caller-rendered DropdownMenu triggers among the rows and controls in the next sentence.

| FR31–FR33 | Browser tests and storyboards under a finger | a menu, a Popover and a ContextMenu lift: open, close, a pan outside, a tap outside, a pinch over the surface; a mouse | a surface that does not grow from and shrink into its trigger, a pan outside that leaves a menu open, a Popover whose dismissal changed, a blocked pinch, a tap outside that reaches the page, or a changed mouse path fails |
| FR34, FR35 | Browser tests and storyboards under a finger | a sub-menu drilling in and its Back row returning; a tap and a drag during a popover's and a menu's growth; a pinch during growth; a mouse | a drill-in that leaves the parent's rows in place, a change between levels that does not play on its roles, a tap during growth that closes, scrolls or moves focus, a blocked pinch, or a changed mouse path fails |
| FR36–FR40 | Release tests on synthetic touch streams with explicit timestamps, per use | below and past each commit point; a flick that projects past it; a slow drag past it; a release moving back; Reduce Motion; keyboard and mouse paths | a decision that changes mid-settle, a release moving back that commits, a settle that does not start at the release velocity, or an action with no keyboard or mouse path fails |
| FR41 | Browser tests with real touch input (`spec:AST-013` FR10) | a tap; a long press on a ContextMenu trigger, a row with a context menu, and a slider thumb; a long press on a checkbox row's label and on plain text; a cancelled press; mouse and keyboard selection | a tap that selects, a hold with an action that starts a selection or callout, a label or plain text whose long press does not select natively, a suppression that outlives the press, or a change to native selection elsewhere or to mouse, keyboard, or assistive-technology selection fails |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each hold state listed here (a ContextMenu trigger, a row with a context menu, a slider thumb) already carries always-on user-select: none, so this row passes even without the press-scoped suppression, and "a suppression that outlives the press" cannot be observed on any of them. Adding "a long press on a caller-rendered DropdownMenu trigger" gives FR41's new behavior a subject.

…suppression, scopes native selection to labels and text; current state names the components
@cixzhang
cixzhang force-pushed the spec/ast094-touch-selection branch from ed47b9c to a2d2cd4 Compare October 26, 2026 00:21
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec a2d2cd4

cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
…ne held press, on elements whose hold does something

meta#8071 now leaves gestureHostStyle to touch-action alone and moves the
long-press styles to holdSelectionStyle, applied for one press. The host
applies it per finger or pen contact on the elements a long press is
attached to and restores them when the contact ends, refcounted across
contacts, so the long-press callout stays off under a held finger while
everything else keeps the browser's long-press selection (spec:AST-094
FR41, pending meta#8454). A mouse is untouched. Tests cover both the held
element and a plain one.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR41 and DEC-9 carry an engineering owner's approval for this exact revision, and the three record fixes asked for on the previous revision are in: DEC-9 now limits native selection to labels and plain text, the current-state bullet names DropdownMenu's built-in trigger, and the FR41 verification row covers a trigger the caller renders. Nothing else blocks this record change. Two optional touches before merge: add an assistive-technology state to the FR41 verification row, since its failure column already names one, and align the pull request description's Current-state impact and Decision bullets with the narrower rule the record now states.

[Automated review]

| FR31–FR33 | Browser tests and storyboards under a finger | a menu, a Popover and a ContextMenu lift: open, close, a pan outside, a tap outside, a pinch over the surface; a mouse | a surface that does not grow from and shrink into its trigger, a pan outside that leaves a menu open, a Popover whose dismissal changed, a blocked pinch, a tap outside that reaches the page, or a changed mouse path fails |
| FR34, FR35 | Browser tests and storyboards under a finger | a sub-menu drilling in and its Back row returning; a tap and a drag during a popover's and a menu's growth; a pinch during growth; a mouse | a drill-in that leaves the parent's rows in place, a change between levels that does not play on its roles, a tap during growth that closes, scrolls or moves focus, a blocked pinch, or a changed mouse path fails |
| FR36–FR40 | Release tests on synthetic touch streams with explicit timestamps, per use | below and past each commit point; a flick that projects past it; a slow drag past it; a release moving back; Reduce Motion; keyboard and mouse paths | a decision that changes mid-settle, a release moving back that commits, a settle that does not start at the release velocity, or an action with no keyboard or mouse path fails |
| FR41 | Browser tests with real touch input (`spec:AST-013` FR10) | a tap; a long press on a ContextMenu trigger, a DropdownMenu trigger the caller renders, a row with a context menu, and a slider thumb; a long press on a checkbox row's label and on plain text; a cancelled press; mouse and keyboard selection | a tap that selects, a hold with an action that starts a selection or callout, a label or plain text whose long press does not select natively, a suppression that outlives the press, or a change to native selection elsewhere or to mouse, keyboard, or assistive-technology selection fails |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the failure column fails a change to assistive-technology selection, but no representative state exercises it. Adding one, such as VoiceOver text selection near a menu row, would give that failure something to observe.

@cixzhang
cixzhang merged commit e1deabd into main Oct 26, 2026
57 checks passed
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
…t, and a mouse holds them where the pointer is fine

Under a finger the steppers' reach reads `--size-touch-target` (44 px by
default): each half takes at least that square, with no change to the
layout.

Where the primary pointer is fine the gesture host attaches only what reads
each event's pointer (spec:AST-094 FR19). The stepper's press tracker opts
in (`perEventPointer`), so a mouse held on a stepper repeats as a finger
does: the hold is pointer-agnostic, as item 3 of the meta#8205 review asks, the
kind of exception spec:AST-057 grants the row swipe. New test: where the
pointer is fine the stepper attaches with no warning, while a plain press
tracker beside it stays inactive and one that opted in gets the same press.

The selection lock's comments name the held stepper's lock (`keepsTouch`;
spec:AST-094 FR41, proposed in meta#8454), and the motion README's stepper row
says what the table holds now.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
…ss tracker's option

On this base the gesture host turns text selection off under a held finger
only for a long press or a recognizer that asks (spec:AST-094 FR41,
proposed in meta#8454). The stepper's hold-repeat runs on a press tracker,
which cannot ask yet, so the host no longer locks selection on the column.
The lock's browser proof is marked fixme with that reason; its
touch-action half stays a test of its own. The comments that named the
stepper's lock describe the host's rule. No workaround: nothing else
changes.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
…lock (spec:AST-094 FR41)

FR41 and DEC-9, current on main since meta#8454: on a control whose own record
defines a hold action, such as a stepper's hold-repeat, the browser's
text-selection start and callout are suppressed for that press only, and
suppressing selection on every press-tracked control is rejected. A press
tracker now takes the same opt-in a recognizer does, selectionLock (pass
lockSelection), through PressTrackerOptions, usePressTracker and the
TouchConsumer it attaches as; the host calls that lock for each press on
the tracker's element, under the same rule as a recognizer's (a touch or
pen contact where the primary pointer is coarse), and never imports one. A
tracker without it keeps the browser's long-press selection.

Tests, failing before: the host calls a press tracker's own lock for a
finger's press on its element and releases it at the lift, not for a mouse
press or a tracker without one; usePressTracker hands its lock to the
host.
@github-actions
github-actions Bot deleted the spec/ast094-touch-selection branch October 26, 2026 06:31
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…s something (AST-094 FR41)

Per Cindy's selection decision (D1) and spec:AST-094 FR41 (meta#8454): the
blanket lock on every pressable goes. Text selection and the callout are
suppressed for one held press only on elements whose hold does something:
a long press (a menu, a hold-repeat) and a recognizer with
preventsTextSelection (a slider's thumb, a switch's or a segmented
control's drag), with a non-text input under the finger inside them.
Everything else, a press-tracked control or row and the document press
controller's surfaces included, keeps the browser's long-press selection;
a tap never selects. The document press controller no longer locks at all.

Tests: a hold on a plain pressable (attached, delegated, the press
controller's row, a pen) keeps native selection; a hold on a menu trigger
and on a pan that asks turns it off for the press; the browser proof checks
both in a real engine, and a checkbox inside a switch's drag versus one in
a plain row. The long press's lock also stands in for the permanent
long-press style once meta#8071's holdSelectionStyle change merges up.
vjeux added a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…lock (spec:AST-094 FR41)

FR41 and DEC-9, current on main since meta#8454: on a control whose own record
defines a hold action, such as a stepper's hold-repeat, the browser's
text-selection start and callout are suppressed for that press only, and
suppressing selection on every press-tracked control is rejected. A press
tracker now takes the same opt-in a recognizer does, selectionLock (pass
lockSelection), through PressTrackerOptions, usePressTracker and the
TouchConsumer it attaches as; the host calls that lock for each press on
the tracker's element, under the same rule as a recognizer's (a touch or
pen contact where the primary pointer is coarse), and never imports one. A
tracker without it keeps the browser's long-press selection.

Tests, failing before: the host calls a press tracker's own lock for a
finger's press on its element and releases it at the lift, not for a mouse
press or a tracker without one; usePressTracker hands its lock to the
host.
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…lection locks per press

- attachTapHaptic: the hidden switch never keeps the focus. Where a
  label's activation focuses its control (Chromium), the focus goes on to
  the label's own control, or back where it was, so it never lands on an
  aria-hidden element.
- attachTapHaptic: a label that already has a control keeps it. The switch
  goes first, takes the label's activation (so a real tap plays) and hands
  the click on, so the control still toggles. A control that is itself a
  switch plays on its own, and a label tied by `for` is left as it is.
- gestureHostStyle sets only the touch-action. The callout and
  text-selection lock moves to holdSelectionStyle, which a host applies
  for one held press only, on an element whose hold does something
  (spec:AST-094 FR41, pending meta#8454); a mouse, a keyboard and assistive
  technology keep selecting (spec:AST-017 FR59).

The three new haptic tests fail on the previous head.
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…ne held press, on elements whose hold does something

meta#8071 now leaves gestureHostStyle to touch-action alone and moves the
long-press styles to holdSelectionStyle, applied for one press. The host
applies it per finger or pen contact on the elements a long press is
attached to and restores them when the contact ends, refcounted across
contacts, so the long-press callout stays off under a held finger while
everything else keeps the browser's long-press selection (spec:AST-094
FR41, pending meta#8454). A mouse is untouched. Tests cover both the held
element and a plain one.

This branch was successfully deployed

1 active deployment
Preview — a2d2cd42 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant