Repository navigation
spec(AST-094): a held finger does what the hold does, not a selection (FR41, DEC-9) - #8454
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
The exact-head preview is not available yet. Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
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
triggerPressablealready setuser-select: noneand-webkit-touch-callout: noneat 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]
| - 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"?
|
Posted by Cindy's agent on her behalf. Cindy's decision on touch text selection:
|
52f0f30 to
615872e
Compare
…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.
There was a problem hiding this comment.
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
triggerPressableand menu styles, and Slider's track already setuser-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:AvatarFR1, 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-017FR59 covers only the mouse part of FR41's last sentence.
[Automated review]
| - 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. |
There was a problem hiding this comment.
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?
| 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 |
There was a problem hiding this comment.
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."
| 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 |
There was a problem hiding this comment.
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.
…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.
615872e to
ed47b9c
Compare
|
/approve-spec ed47b9c |
There was a problem hiding this comment.
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:AvatarFR1 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 throughrenderTriggergets 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]
| 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 |
There was a problem hiding this comment.
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."
| - 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 |
There was a problem hiding this comment.
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 | |
There was a problem hiding this comment.
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.
…nu, not a selection (FR41, OQ11, OQ12)
…opy item; OQ12 stays open
…2 resolved; no open questions
…suppression, scopes native selection to labels and text; current state names the components
…er-rendered DropdownMenu triggers
ed47b9c to
a2d2cd4
Compare
|
/approve-spec a2d2cd4 |
…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.
There was a problem hiding this comment.
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 | |
There was a problem hiding this comment.
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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
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-094FR29 (DropdownMenu press timing and handoff), FR33 (ContextMenu under a held finger, lift), FR19 (coarse primary pointer only).spec:AST-017FR59: touch work leaves fine-pointer behavior alone.Decision
spec:AST-094FR41 and DEC-9 (Cindy, 2026-10-25, D1 = a, D1.1, D1.2 = z):Native evidence (public documentation)
UIContextMenuInteractionpresents a menu on a long press of the view it is attached to; text selection comes fromUITextInteractionon 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).View.OnLongClickListener, context menus) takes the long press when it handles it; text selection starts on a long press only in aTextViewwithtextIsSelectable, 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
Writing rubric results
Scope
Validation
pnpm check:knowledge(CI lint)git diff --check