Repository navigation
Conversation
meta#8270's selection lock writes no style where iOS WebKit does not run: it cancels selectstart while the press holds. The press tracker's case reads that, in jsdom, as the lock in force during the press and gone after.
…er reports no highlight change The press ends inside the release guard, so the control hears no onHighlightChange(false): the handler that disables it clears its own highlight, as the review asks.
… in the edge zone spec:AST-094 FR18's screen-edge refinement. A pan from one edge derives a touch-action that takes the axis across that edge (pan-x for a side edge, pan-y for top or bottom) only when its view is the edge zone: a thin element along the edge, no wider than `edgeRegion` across it. There the browser has nothing to scroll, so the pan still decides at its 15 px hysteresis without losing the touch. On any wider view it leaves the browser every touch behavior, so the author's scrolling there is untouched. The view's size comes from a new optional `viewSize` on the gesture environment (the default measures the element). Pans from several edges are unchanged. The edge-zone tests fail on the previous head. The pan and swipe tests also read their own table groups (UIKIT_PAN, UIKIT_VELOCITY, UIKIT_SWIPE), which completes the per-group imports in this change.
…-action mark, per-group UIKit imports) onto cixzhang's daf723b
Where the primary pointer is fine, one attached perEventPointer press tracker made the host install every document touch and pointer listener and the window click listener for as long as it stayed attached. The tracker's element now listens for a finger's press itself (passive, on the element only); the host adds its document and window listeners at that press's start, hands it the press, and removes them once its contacts end, so they last only the press (spec:AST-094 FR19's exception for a press's feedback). A mouse press on the element adds nothing. Test: an idle attached tracker leaves no document or window touch, pointer or click listener; a finger's press paints and adds them; its lift removes them. It fails on the previous head. Co-authored-by: Christopher Chedeau <[email protected]>
… an entrance catching an exit starts where it is
- decay accepts touchRelease and hands it to the spring back's transition,
so a spring back a touch drag's release starts cross-fades on a fine
pointer too (design:reduced-motion DR2); the README and coast.ts say so.
- A move taken back mid-dip (animate({x: 100}) then animate({x: 0})) left
an emptied landing that kept the dip going down to 0 and back; a dip
left with nothing to land now fades straight back in from where it is.
- An entrance by role caught mid-exit opened its fade at 0 and headed for
the exit's 0; it now starts from the opacity on screen and fades back to
what the exit would have restored, the exit's landing taken over as a
named opacity's is.
Three tests fail on the previous head.
…to play(curves) decay's doc keeps play(curves)'s 'play it with play or animate' beside the new touchRelease sentence.
…to pseudo-element support
… per-event press tracker's listener lifetime Where the pointer is fine, a per-event press tracker's element gets passive touchstart and pointerdown listeners and no style, and the host's document and window listeners come only for a finger's press on it; a per-event recognizer keeps its listeners and style. The host's header now names the carve-out, and AttachOptions and the gestures README stop saying the host styles the tracker's element there. Co-authored-by: Christopher Chedeau <[email protected]>
…cross-fade for a spring back With decay taking touchRelease, a spring back from past an edge also cross-fades on a fine pointer when a touch drag's release starts it (design:reduced-motion DR2); the header and the changeset now say so, as decay's docs, the README and coast.ts do.
…eset) into play(curves)
…eset) into pseudo-element support
…Hold`) `architecture:layer-runtime` INV14 already uses "presentation hold" for keeping a layer's chosen presentation from open until the close settles, a latch. This module does something else: it drops input while a presentation animates. Renamed as cixzhang asked on this pull request: `Layer/inputHold.ts` exports `holdInput`, `useInputHold`, `isInputShield` and `isInHeldLayer`, its types are `InputHoldScope`, `InputHoldEnd` and `InputHoldOptions`, and its tests, fixture, browser spec and changeset take the same name, with "input hold" in the docs and comments. Behavior is unchanged.
# Conflicts: # internal/interaction-harness/README.md # internal/interaction-harness/package.json # internal/interaction-harness/src/harness.interaction.browser.spec.ts # internal/interaction-harness/src/story.ts
…the pointer is fine Beside an attached per-event recognizer or press tracker, a watchFingerScrolls watch kept every document touch and pointer listener and the window click listener installed for its whole life where the primary pointer is fine. A watch now counts only under a coarse pointer; under a fine one the page listeners still come only for a finger's press on a per-event press tracker (spec:AST-094 FR24), and the watch hears that press. The idle fine-pointer test now adds a finger-scroll watch and still finds no page listener; it fails on the previous head. Co-authored-by: Christopher Chedeau <[email protected]>
…mit (spec:AST-094 FR35, FR24) Since the input hold listens to nothing while nothing is held (FR24), it cannot know a pointer used before it began: during the entrance a mouse press made before the mouse moves meets the shield, and once the mouse moves its press reaches the action. On the previous offer the still press reached the action.
…'s to its end (spec:AST-094 FR35) Red on the offer as it stands (found by meta#8630's Dialog case): a mouse that has not moved during a presentation's hold presses, its pointerdown meets the shield, and the shield then steps aside because that pointerdown named a mouse. The release is hit-tested on what lies beneath (an action), so the browser sends the click to the common ancestor of the two targets, the dialog, which Dialog reads as a backdrop click and closes on. - The shield stays up through a mouse press that begins on it, a drag included; only a mouse moving with no button down lets it through. - The gesture host's gate holds what lands on a shield, a mouse's press included. - In the browser: a still mouse press during a dialog's hold lands its release and click on the shield and reaches nothing; once the mouse moves, its press reaches the dialog's recognizer, as with no hold. - The gate case moves its mouse before pressing, as a mouse that passes now must.
…s to its end (spec:AST-094 FR35) Found by meta#8630's Dialog case: a mouse that had not moved during a presentation's hold pressed, its pointerdown met the shield, and the shield stepped aside because that pointerdown named a mouse. The release was hit-tested on what lay beneath, so the browser sent the click to the common ancestor of the two targets, the dialog, which Dialog read as a backdrop click and closed on. Only a mouse moving with no button down lowers a presentation's shields now; a finger's or a pen's press or move raises them as before. A mouse press that begins on a shield keeps it up to its end, so its release and click land on the shield, and the gesture host's gate holds whatever lands on a shield, a mouse's press included.
… the Dialog and Drawer entrance hold
There was a problem hiding this comment.
Approval needs an engineering owner's decision: spec:AST-094 FR35 holds a finger while a touch presentation enters, which FR13 scopes to a coarse primary pointer, but this entrance hold also runs where the primary pointer is fine, holding a finger and adding window listeners in components that use no gesture, where FR43, FR24 and architecture:react-component-runtime INV13 let only components that use a gesture listen. An engineering owner can approve that by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise the hold should apply only where the primary pointer is coarse. Independently of that decision, these need changes:
- During every Dialog or Drawer entrance, a mouse press made before the pointer moves lands on the input shield and reaches nothing (
Layer/inputHold.ts:58-61), against FR35's "A mouse keeps today's behavior" and the changeset's "a mouse or a trackpad is unchanged". - Core's root entry now carries the gesture host, so
scripts/touch-support-bundle.test.mjs"is absent from the root entry" fails; #8671 or an equivalent test change needs to land first. - Rebase onto the landed #8342 stack so the diff is this change's own 12 files; 25,087 of its 26,303 authored lines come from that stack.
[Automated review]
| return [...state.layers]; | ||
| } | ||
| heldDocuments.delete(doc); | ||
| latestPointer.delete(doc); |
There was a problem hiding this comment.
Forgetting the latest pointer here means a presentation that opens while nothing else is held always starts with its shield raised for a mouse, so a mouse or trackpad press made before the pointer moves lands on the shield and reaches nothing (lines 58-61), in every Dialog and Drawer entrance. spec:AST-094 FR35 says "A mouse keeps today's behavior", and its verification row fails a changed mouse path. Seeding the pointer from input already heard, for example by recording the pointer type in the interaction-modality store whose document pointerdown listener Dialog already installs (Drawer would need the same tracking), would let a presentation a mouse opened pass mouse hits from the start without a new idle listener.
| * pinch still zooms the page. A mouse keeps today's behavior: the hold decides | ||
| * by each event's pointer, never by the primary pointer, so a mouse or a | ||
| * trackpad keeps every click on a touch screen, and a finger is held on a | ||
| * laptop whose primary pointer is a mouse. |
There was a problem hiding this comment.
#8646 has landed, but its FR43 governs gestures and never names the entrance hold, while FR35 reaches a touch presentation, which FR13 applies under a coarse primary pointer; FR43 and INV13 still let only a component that uses a gesture listen under a fine pointer. Holding a finger on a mouse-primary laptop, with the hold's 14 window listeners for every entrance, needs an engineering owner's /approve-spec on this head; otherwise return null unless the primary pointer is coarse, keeping the per-event check inside that gate.
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] Under a finger, a tap or a drag that lands while a `Dialog` or a `Drawer` is still entering no longer closes it, runs one of its actions, moves focus or scrolls the page: it reaches nothing until the entrance has played, and the dialog or drawer finishes entering and stays open. Keys and assistive technology stay live during the entrance, the content stays in the accessibility tree, a pinch still zooms the page, and a mouse or a trackpad is unchanged, even on a touch screen. |
There was a problem hiding this comment.
"a mouse or a trackpad is unchanged, even on a touch screen" does not hold at this head: during every entrance a mouse press made before the pointer moves lands on the shield (Layer/inputHold.ts:58-61). The same sentence is in Dialog.doc.mjs:72 and Drawer.doc.mjs:175; fix the hold, or narrow all three.
|
/approve-spec 7aa9117 |
- MobileNav: the touch-presentation proofs stop the page's clock and run it on by exact amounts, so each probe and tap lands inside the slide-in or the close, and the close is read exactly (at most 250 ms) (from meta#8374). - Dialog and Drawer: each entrance check plays one drag and proves it arrived (a capture-phase touch probe added before the page's scripts); the page's movement is read from the visual viewport (from meta#8630). - Layer: a hold under a moving touch is released at an exact step of the drag, and the document's log covers the touch from its start to its end.
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves: holdInput(layer, {until, scope}) raises a shield (scope
'viewport' while it enters; 'layer' while it leaves, its content inert),
decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users: Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput). MobileNav's drawer takes no finger
input while it slides in (a 'viewport' hold until the slide-in's
transition ends) or out (a 'layer' hold from the close request until the
dialog closes), and AppShell lets the slide-out play to its end.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
|
Folded into #8342 under the maintainers' section plan; the commit credits this PR's authors. Closing; the branch stays. |
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves: holdInput(layer, {until, scope}) raises a shield (scope
'viewport' while it enters; 'layer' while it leaves, its content inert),
decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users: Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput). MobileNav's drawer takes no finger
input while it slides in (a 'viewport' hold until the slide-in's
transition ends) or out (a 'layer' hold from the close request until the
dialog closes), and AppShell lets the slide-out play to its end.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput), a non-modal Drawer only on its panel;
MobileNav's drawer takes no finger input while it slides in; AppShell lets
the slide-out play to its end. Under a fine primary pointer nothing is held
and nothing listens (FR24). Where the primary pointer is fine and the
screen also takes touch, a finger is not held yet; AST-094's current-state
impact and Drawer's record name that gap.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput), a non-modal Drawer only on its panel;
MobileNav's drawer takes no finger input while it slides in; AppShell lets
the slide-out play to its end. Under a fine primary pointer nothing is held
and nothing listens (FR24). Where the primary pointer is fine and the
screen also takes touch, a finger is not held yet; AST-094's current-state
impact and Drawer's record name that gap.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput), a non-modal Drawer only on its panel;
MobileNav's drawer takes no finger input while it slides in; AppShell lets
the slide-out play to its end. Under a fine primary pointer nothing is held
and nothing listens (FR24). Where the primary pointer is fine and the
screen also takes touch, a finger is not held yet; AST-094's current-state
impact and Drawer's record name that gap.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput), a non-modal Drawer only on its panel;
MobileNav's drawer takes no finger input while it slides in; AppShell lets
the slide-out play to its end. Under a fine primary pointer nothing is held
and nothing listens (FR24). Where the primary pointer is fine and the
screen also takes touch, a finger is not held yet; AST-094's current-state
impact and Drawer's record name that gap.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
MobileNav's record states what the rest of the slide-out after the close
does: it takes no input and is hidden from assistive technology (FR5). A
browser case proves both against the open drawer.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, or from the
start when the page last heard a mouse, DEC-16), never cancels a touch's
start, and cancels a one-finger move so a pinch still zooms (FR10). It
hears input through Core's shared input stream before every other
subscriber, and ends the dispatch for a held event, so press feedback and the
gesture host never hear it; the stream gains first subscribers and records
the type of the latest pointer event it delivers (getLastPointerType). The gesture
host asks the hold for each touch (holdsTouch), so the hold imports nothing
from gestures/ and a component in the root entry may use it statically
(architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or
drag while they enter (holdEntranceInput, which reads the entrance's own
animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer
only on its panel; AppShell lets the slide-out play to its end. Under a
fine primary pointer nothing is held and nothing listens (FR24). Where the
primary pointer is fine and the screen also takes touch, a finger is not
held yet; AST-094's current-state impact and Drawer's record name that gap.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
MobileNav's record states what the rest of the slide-out after the close
does: it is inert, taking no input and hidden from assistive technology
(FR5). A
browser case proves both against the open drawer.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, or from the
start when the page last heard a mouse, DEC-16), never cancels a touch's
start, and cancels a one-finger move so a pinch still zooms (FR10). It
hears input through Core's shared input stream before every other
subscriber, and ends the dispatch for a held event, so press feedback and the
gesture host never hear it; the stream gains first subscribers and records
the type of the latest pointer event it delivers (getLastPointerType). The gesture
host asks the hold for each touch (holdsTouch), so the hold imports nothing
from gestures/ and a component in the root entry may use it statically
(architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or
drag while they enter (holdEntranceInput, which reads the entrance's own
animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer
only on its panel; AppShell lets the slide-out play to its end. Under a
fine primary pointer nothing is held and nothing listens (FR24). Where the
primary pointer is fine and the screen also takes touch, a finger is not
held yet; AST-094's current-state impact and Drawer's record name that gap.
AST-094's current-state impact also names the first press of a still mouse
after a finger, which lands on an entering presentation's shield. AlertDialog
renders Dialog, so its entrance is held too: its record says FR7 ships in
part, the leaving alert's inert content waiting for FR6's dismissal.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
MobileNav's record states what the rest of the slide-out after the close
does: it is inert, taking no input and hidden from assistive technology
(FR5). A browser case proves both against the open drawer.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, or from the
start when the page last heard a mouse, DEC-16), never cancels a touch's
start, and cancels a one-finger move so a pinch still zooms (FR10). It
hears input through Core's shared input stream before every other
subscriber, and ends the dispatch for a held event, so press feedback and the
gesture host never hear it; the stream gains first subscribers and records
the type of the latest pointer event it delivers (getLastPointerType). The gesture
host asks the hold for each touch (holdsTouch), so the hold imports nothing
from gestures/ and a component in the root entry may use it statically
(architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or
drag while they enter (holdEntranceInput, which reads the entrance's own
animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer
only on its panel; AppShell lets the slide-out play to its end. Under a
fine primary pointer nothing is held and nothing listens (FR24). Where the
primary pointer is fine and the screen also takes touch, a finger is not
held yet; AST-094's current-state impact and Drawer's record name that gap.
AST-094's current-state impact also names the first press of a still mouse
after a finger, which lands on an entering presentation's shield. AlertDialog
renders Dialog, so its entrance is held too: its record says FR7 ships in
part, the leaving alert's inert content waiting for FR6's dismissal.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
MobileNav's record states what the rest of the slide-out after the close
does: it is inert, taking no input and hidden from assistive technology
(FR5). A browser case proves both against the open drawer.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, or from the
start when the page last heard a mouse, DEC-16), never cancels a touch's
start, and cancels a one-finger move so a pinch still zooms (FR10). It
hears input through Core's shared input stream before every other
subscriber, and ends the dispatch for a held event, so press feedback and the
gesture host never hear it; the stream gains first subscribers and records
the type of the latest pointer event it delivers (getLastPointerType). The gesture
host asks the hold for each touch (holdsTouch), so the hold imports nothing
from gestures/ and a component in the root entry may use it statically
(architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or
drag while they enter (holdEntranceInput, which reads the entrance's own
animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer
only on its panel; AppShell lets the slide-out play to its end. Under a
fine primary pointer nothing is held and nothing listens (FR24). Where the
primary pointer is fine and the screen also takes touch, a finger is not
held yet; AST-094's current-state impact and Drawer's record name that gap.
AST-094's current-state impact also names the first press of a still mouse
after a finger, which lands on an entering presentation's shield. AlertDialog
renders Dialog, so its entrance is held too: its record says FR7 ships in
part, the leaving alert's inert content waiting for FR6's dismissal.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
MobileNav's record states what the rest of the slide-out after the close
does: it is inert, taking no input and hidden from assistive technology
(FR5). A browser case proves both against the open drawer.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
Dialog and Drawer hold a finger's and a pen's input with holdInput while their entrance plays (holdEntranceInput, deciding by each event's pointer): a tap or a drag mid-entrance closes nothing, runs no action and scrolls nothing; a mouse, the keyboard and a screen reader are unchanged (spec:AST-094 FR35, FR24). The entrance specs' wait for the entrance swallows only a canceled animation. From meta#8630.
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves: holdInput(layer, {until, scope}) raises a shield (scope
'viewport' while it enters; 'layer' while it leaves, its content inert),
decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Dialog and Drawer hold a finger's tap or drag during their entrance
through holdEntranceInput.
From meta#8342 and its per-event offer, and meta#8630 (Dialog and Drawer).
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves: holdInput(layer, {until, scope}) raises a shield (scope
'viewport' while it enters; 'layer' while it leaves, its content inert),
decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, DEC-16), never
cancels a touch's start, and cancels a one-finger move so a pinch still
zooms (FR10). The gesture host asks the hold for each touch (holdsTouch),
so the hold imports nothing from gestures/ and a component in the root
entry may use it statically (architecture:react-component-runtime INV13).
Its first users: Dialog and Drawer hold a finger's tap or drag during
their entrance (holdEntranceInput). MobileNav's drawer takes no finger
input while it slides in (a 'viewport' hold until the slide-in's
transition ends) or out (a 'layer' hold from the close request until the
dialog closes), and AppShell lets the slide-out play to its end.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
- MobileNav: the touch-presentation proofs stop the page's clock and run it on by exact amounts, so each probe and tap lands inside the slide-in or the close, and the close is read exactly (at most 250 ms) (from meta#8374). - Dialog and Drawer: each entrance check plays one drag and proves it arrived (a capture-phase touch probe added before the page's scripts); the page's movement is read from the visual viewport (from meta#8630). - Layer: a hold under a moving touch is released at an exact step of the drag, and the document's log covers the touch from its start to its end.
…av (spec:AST-094 FR35)
Layer/inputHold holds a layer's pointer input while its presentation
enters or leaves. holdInput(layer, {until, scope}) raises a shield:
'viewport' over the whole viewport while a modal layer enters; 'surface'
over the layer's own box while a non-modal one enters, the page around it
live; 'layer' over the viewport, its content inert, while a layer leaves.
It decides by each event's pointer (a finger's or a pen's press is held to
its end; a mouse passes once it moves with no button down, or from the
start when the page last heard a mouse, DEC-16), never cancels a touch's
start, and cancels a one-finger move so a pinch still zooms (FR10). It
hears input through Core's shared input stream before every other
subscriber, and ends the dispatch for a held event, so press feedback and the
gesture host never hear it; the stream gains first subscribers and records
the type of the latest pointer event it delivers (getLastPointerType). The gesture
host asks the hold for each touch (holdsTouch), so the hold imports nothing
from gestures/ and a component in the root entry may use it statically
(architecture:react-component-runtime INV13).
Its first users hold only under a coarse primary pointer, a touch
presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or
drag while they enter (holdEntranceInput, which reads the entrance's own
animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer
only on its panel; AppShell lets the slide-out play to its end. Under a
fine primary pointer nothing is held and nothing listens (FR24). Where the
primary pointer is fine and the screen also takes touch, a finger is not
held yet; AST-094's current-state impact and Drawer's record name that gap.
AST-094's current-state impact also names the first press of a still mouse
after a finger, which lands on an entering presentation's shield. AlertDialog
renders Dialog, so its entrance is held too: its record says FR7 ships in
part, the leaving alert's inert content waiting for FR6's dismissal.
Every browser proof lands its input at an exact point (an entrance held
where it is, the page's clock, or an exact step of a drag) and plays once.
The WebKit interaction lane's scope includes Layer/inputHold.ts: the
gesture host imports it, so the gesture specs' fixture bundles it.
MobileNav's record states what the rest of the slide-out after the close
does: it is inert, taking no input and hidden from assistive technology
(FR5). A browser case proves both against the open drawer.
From meta#8342 and its per-event offer, meta#8630 (Dialog and Drawer) and meta#8374
(MobileNav).
Co-authored-by: Cindy Zhang <[email protected]>
…av (spec:AST-094 FR35) (#8342) * feat(Layer): one input hold, first used by Dialog, Drawer and MobileNav (spec:AST-094 FR35) Layer/inputHold holds a layer's pointer input while its presentation enters or leaves. holdInput(layer, {until, scope}) raises a shield: 'viewport' over the whole viewport while a modal layer enters; 'surface' over the layer's own box while a non-modal one enters, the page around it live; 'layer' over the viewport, its content inert, while a layer leaves. It decides by each event's pointer (a finger's or a pen's press is held to its end; a mouse passes once it moves with no button down, or from the start when the page last heard a mouse, DEC-16), never cancels a touch's start, and cancels a one-finger move so a pinch still zooms (FR10). It hears input through Core's shared input stream before every other subscriber, and ends the dispatch for a held event, so press feedback and the gesture host never hear it; the stream gains first subscribers and records the type of the latest pointer event it delivers (getLastPointerType). The gesture host asks the hold for each touch (holdsTouch), so the hold imports nothing from gestures/ and a component in the root entry may use it statically (architecture:react-component-runtime INV13). Its first users hold only under a coarse primary pointer, a touch presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or drag while they enter (holdEntranceInput, which reads the entrance's own animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer only on its panel. Under a fine primary pointer nothing is held and nothing listens (FR24). Where the primary pointer is fine and the screen also takes touch, a finger is not held yet; AST-094's current-state impact and Drawer's record name that gap. AST-094's current-state impact also names the first press of a still mouse after a finger, which lands on an entering presentation's shield. AlertDialog renders Dialog, so its entrance is held too: its record says FR7 ships in part, the leaving alert's inert content waiting for FR6's dismissal. Every browser proof lands its input at an exact point (an entrance held where it is, the page's clock, or an exact step of a drag) and plays once. The WebKit interaction lane's scope includes Layer/inputHold.ts: the gesture host imports it, so the gesture specs' fixture bundles it. MobileNav's record states what the rest of the slide-out after the close does: it is inert, taking no input and hidden from assistive technology (FR5). A browser case proves both against the open drawer. From #8342 and its per-event offer, #8630 (Dialog and Drawer) and #8374 (MobileNav). Co-authored-by: Cindy Zhang <[email protected]> * Merge branch 'main' into uikit/c18-presentation-hold
#10062) * chore(core): the layer runtime's exit copy, for a touch presentation's close placeLayerExitCopy puts a static, inert copy of a closing layer where the layer was drawn, in the top layer, for a touch presentation's close to play on: the browser hides a popover the moment it closes. The copy keeps the layer's box, transform, presented look, overflow and scroll positions; has no ids, anchor names, form names or form owner; is inert and hidden from assistive technology; and its descendants' keyframe animations and transitions do not start again. A refused show during the closing toggle waits, hidden, until the toggle is over. A layer inside other layers gets its copy after the outermost one, with what it inherited there (its color scheme included), so a close that takes the layers around it too still draws the copy. That copy is shown again above the copy the same close then places for a layer around it. A layer has one copy. The layer-runtime record states it, and that the presentation plays its exit on the copy (AST-094 FR7). Core's shared inertCopy now takes every copied native control and form-associated custom element out of any form with form="", as its documentation says, so the swap's copies join no form either. It also sets anchor-name: none on each copied element that has an anchor name, so no live anchor gets a second element. * feat(Layer): one input hold, first used by Dialog, Drawer and MobileNav (spec:AST-094 FR35) Layer/inputHold holds a layer's pointer input while its presentation enters or leaves. holdInput(layer, {until, scope}) raises a shield: 'viewport' over the whole viewport while a modal layer enters; 'surface' over the layer's own box while a non-modal one enters, the page around it live; 'layer' over the viewport, its content inert, while a layer leaves. It decides by each event's pointer (a finger's or a pen's press is held to its end; a mouse passes once it moves with no button down, or from the start when the page last heard a mouse, DEC-16), never cancels a touch's start, and cancels a one-finger move so a pinch still zooms (FR10). It hears input through Core's shared input stream before every other subscriber, and ends the dispatch for a held event, so press feedback and the gesture host never hear it; the stream gains first subscribers and records the type of the latest pointer event it delivers (getLastPointerType). The gesture host asks the hold for each touch (holdsTouch), so the hold imports nothing from gestures/ and a component in the root entry may use it statically (architecture:react-component-runtime INV13). Its first users hold only under a coarse primary pointer, a touch presentation (FR13): Dialog, Drawer and MobileNav hold a finger's tap or drag while they enter (holdEntranceInput, which reads the entrance's own animations; MobileNav's slide-in is capped at 550 ms), a non-modal Drawer only on its panel. Under a fine primary pointer nothing is held and nothing listens (FR24). Where the primary pointer is fine and the screen also takes touch, a finger is not held yet; AST-094's current-state impact and Drawer's record name that gap. AST-094's current-state impact also names the first press of a still mouse after a finger, which lands on an entering presentation's shield. AlertDialog renders Dialog, so its entrance is held too: its record says FR7 ships in part, the leaving alert's inert content waiting for FR6's dismissal. Every browser proof lands its input at an exact point (an entrance held where it is, the page's clock, or an exact step of a drag) and plays once. The WebKit interaction lane's scope includes Layer/inputHold.ts: the gesture host imports it, so the gesture specs' fixture bundles it. MobileNav's record states what the rest of the slide-out after the close does: it is inert, taking no input and hidden from assistive technology (FR5). A browser case proves both against the open drawer. From #8342 and its per-event offer, #8630 (Dialog and Drawer) and #8374 (MobileNav). Co-authored-by: Cindy Zhang <[email protected]> * feat(Popover): under a finger, it grows out of its trigger and shrinks back into it Under a coarse primary pointer, Popover grows out of its trigger on the theme's entrance duration and easing and shrinks back into it on the theme's exit duration and easing, on the layer runtime's exit copy. A fine primary pointer keeps the layer's own entrance. * test(Popover): browser proofs of the touch presentation's grow and shrink Real-browser proofs, in Chromium and WebKit, that under a finger Popover grows out of its trigger on the theme's entrance tokens and shrinks back on its exit tokens, keeps advancing through a blocked main thread, does no Layout or Paint per frame, and cross-fades under Reduce Motion, with storyboards of both. * Merge #8342 fbe71df (the shared input hold) into the Popover touch presentation (#9823), as #8223's base * fix(Popover): under a finger, a tap during the presentation is ignored, as on iOS While the popover grows out of its trigger under a coarse primary pointer, the layer runtime's input hold takes every touch. A tap outside neither dismisses it nor reaches what is under it, a pan scrolls nothing, and a pinch still zooms the page. * perf(Popover): the touch presentation starts in the next frame Opening a popover under a finger ran the touch presentation in the opening task. The animator's style writes and the box reads laid the anchored page out more often than a mouse opening does, and on a loaded machine that task could pass the 50 ms long-task line. The opening task now reads and writes nothing while it runs. As it ends, after its own reads, the layer's CSS entrance goes off, a write that costs it no layout. A style read after that task then starts no entrance. The presentation waits for the next animation frame, which runs before it paints. There it puts the element invisible at its full size, reads the boxes, starts the curves and takes the input hold. A close before that frame cancels it and leaves the element as the component styles it, with no compositing layer. A presentation again during a dismissal still starts at once, since it reads nothing. Without animation frames, the presentation runs at once and a close plays the shrink. Popover's record notes, under Current-state impact, that the input hold starts on the first frame after the open, so a touch landing within that frame reaches the page. * chore(core): the layer runtime's exit copy, for a touch presentation's close placeLayerExitCopy puts a static, inert copy of a closing layer where the layer was drawn, in the top layer, for a touch presentation's close to play on: the browser hides a popover the moment it closes. The copy keeps the layer's box, transform, presented look, overflow and scroll positions; has no ids, anchor names, form names or form owner; is inert and hidden from assistive technology; and its descendants' keyframe animations and transitions do not start again. A refused show during the closing toggle waits, hidden, until the toggle is over. A layer inside other layers gets its copy after the outermost one, with what it inherited there (its color scheme included), so a close that takes the layers around it too still draws the copy. That copy is shown again above the copy the same close then places for a layer around it. A layer has one copy. The layer-runtime record states it, and that the presentation plays its exit on the copy (AST-094 FR7). Core's shared inertCopy now takes every copied native control and form-associated custom element out of any form with form="", as its documentation says, so the swap's copies join no form either. It also sets anchor-name: none on each copied element that has an anchor name, so no live anchor gets a second element. * Merge branch 'main' into uikit/c26-layer-exit-copy * feat(Popover): under a finger, it grows out of its trigger and shrinks back into it Under a coarse primary pointer, Popover grows out of its trigger on the theme duration step nearest iOS's growth (`--duration-medium-min`) and the theme's entrance easing, and shrinks back into it on the theme's exit duration and easing, on the layer runtime's exit copy. A fine primary pointer keeps the layer's own entrance. * test(Popover): browser proofs of the touch presentation's grow and shrink Real-browser proofs, in Chromium and WebKit, that under a finger Popover grows out of its trigger on the theme's entrance tokens and shrinks back on its exit tokens, keeps advancing through a blocked main thread, does no Layout or Paint per frame, and cross-fades under Reduce Motion, with storyboards of both. * Merge the updated #9823 into the Popover presentation hold (tree matches the lane's intended resolution) * Merge the updated #8223 into the Popover next-frame presentation (frame scheduling kept, createMotionEngine) * Merge branch 'main' into uikit/c26-layer-exit-copy * Merge the updated lower stack branch into uikit/c26-popover-present (own diff unchanged) * Merge the updated lower stack branch into uikit/c27-popover-present-proofs (own diff unchanged) * Merge the updated lower stack branch into uikit/c26-popover-presentation-hold (own diff unchanged) * Merge the updated lower stack branch into uikit/c26-popover-present-next-frame (own diff unchanged) * Merge #8187's input hold into the Popover touch proofs * feat(Popover): a touch during the growth is ignored While the popover grows, the layer runtime's input hold takes every touch, as UIKit ignores touches while it presents a popover. A tap outside does not dismiss it and reaches nothing under it, and a pinch still zooms the page. This folds in the hold that #8223 carried, so the growth and its hold land together. * test(Popover): browser proofs of the hold while the popover grows A tap outside, a tap on the trigger and a pan while the popover grows do nothing, a pinch still zooms, and a storyboard shows the growth going on under a tap outside. Folded from #8223. * docs(AST-094): Popover's input hold starts on the frame after the open AST-094's current-state line for Popover now states the window its Popover record already states: the input hold starts on the first frame after the open, so a touch that lands within that frame reaches the page. Starting the hold at the open would lay the page out twice in the opening task. Two comments now say that the layer's CSS entrance goes off in a microtask, once the script that opened the popover returns. * fix(core): the exit copy keeps no closed layer The exit copy found the inner layers to raise through a module-level set of every copied layer. A layer React removed on close stayed reachable there until a later close showed a copy. The inner layers are inside the closing layer, so they are now found there, and nothing keeps a layer once it is gone. Chromium 150 and later refuse a show during another popover's toggle, so the copy can open in the next frame. The browser spec's light-dismiss case now reads the copy after a frame, as its nested-close cases do. The cap check's comment now names only the copy cap. * docs(core): the exit copy's JSDoc states the empty-canvas rule once The empty-canvas rule stays in the first paragraph, and the inert-copy paragraph no longer repeats it or `inertCopy`'s own contract. * Merge the updated lower stack branch into uikit/c26-popover-present (own diff unchanged) * Merge the updated lower stack branch into uikit/c27-popover-present-proofs (own diff unchanged) * Merge the folded #9823 into the Popover next-frame presentation (#8223 absorbed into #8187) * test(Popover): time the rendering proof from each motion's start The growth now starts in a frame callback. Where the compositor starts it in that frame, its animation starts at the frame's time, before the animate() call the logger stamped. The presentation's window then ended less than 20 ms before the growth did, and it could reach the one-off work at the growth's end. The logger now records each call and the animation's own start time. A wait still finds its animation by the call, which always follows the key press, and times its window from the start. * test(Popover): the blocked-main-thread proof blocks from the page and asserts the verdict The page now starts the block once the growth has run a frame, and the proof asserts the harness verdict, which fails a judged part under 4 frames. Here the growth runs 600 ms at a constant speed, so each frame moves several pixels and a block that starts late on a loaded machine still lands inside it. * Merge the updated lower stack branch into uikit/c26-popover-present-next-frame (own diff unchanged) * fix(Selector): the overlay clamps in layout, so the keyboard cap and every reader of the layer's box see it The selected-item overlay realized its viewport clamp as a negative margin on the anchored layer, which anchor positioning's fit check swallowed, so a list opened near the viewport's end lay past it. A translate instead hid the clamp from every layout reader: the software keyboard's cap read the layer's untransformed box, and a same-size move painted a stale frame. The overlay's layer now takes no position fallbacks (an internal layer option, off by default) and clamps in layout: `inset-block-start` places the selected row's center on the anchor's center between the viewport's gutters, and `inset-inline-start` starts the layer at its anchor's own start inside the inline gutters, from three private variables the Selector sets (the row's offset in the list, and the layer's block and inline sizes). A move or a scroll re-places the list in the same layout, so no frame paints a stale place; content and selection re-measure on the layer's resettle watcher and commit synchronously. Tests: every overlay case asserts a usable list (at least two rows in full view, or every row), the move case asserts no stale painted frame, the keyboard case asserts two rows above the keyboard line, and a cross-engine spec checks the clamp in Chromium and WebKit in both directions, a list wider than its trigger and a list taller than the room included. A story places a Selector near the viewport's end beside a text input. * refactor(Selector): drop the overlay layer that never flips The owners ruled that every anchored placement can flip, so the overlay layer's internal no-fallback option, its layer-runtime paragraph and the Selector FR2 rewrite go. This restores every file of this change to its base. On main, the layer's end gutter already keeps the list inside the viewport. * Merge main * fix(Selector): the selected row stays on the trigger as options grow The selected-item overlay measured its margin once, when the list opened. An option that grew above the selection while the list was open left the row off the trigger, and a list near the viewport's end grew past it. The browser then flipped the layer above its anchor, where the margin moved the list the wrong way. The overlay now measures again when the open listbox resizes, through the shared resize observer, and commits before the frame paints. On a layer flipped above its anchor, the margin sets the same clamped top from the anchor's top. * fix(Selector): read the overlay's flip safely, skip the first report An engine with the Popover API but no CSS anchor positioning has no positionArea on its computed style, so the overlay threw on every open there. It now reads getPropertyValue('position-area'), which gives an empty string in such an engine. observeResize reports once at registration, inside the commit that opens the list, where React cannot flush and warns. That report is now skipped, since the measuring Effect already runs in that commit. A list at its height cap does not resize when an option grows, so the changeset now claims the fix only for a list shorter than its cap. * test(Selector): drop a stray comment and an unused helper parameter The growth spec carried a doc comment that documented no declaration, and a prepare parameter on openPreSelected that no case passed. Both go, and no proof changes. * docs(Selector): say plainly why the first resize report is skipped The comment on the open list's resize observation ended in the passive "so it is skipped". It now leads with the action and keeps the reason. * Merge main * refactor(Selector): observe the open list with observeResizeAfterLayout The shared resize observer now has observeResizeAfterLayout (#9810). It observes an element without the report observeResize makes when it registers. The open list's observer skipped that report by hand, so it now uses the helper, as useTruncation does. No other shared-observer subscriber watches the list, so the helper's microtask report never runs, and the list behaves as before. * Merge main * fix(Selector): keep a flipped list above the software keyboard The margin for a list the browser flipped above its trigger had no keyboard term. Beside a field near the viewport's end, the list stayed under a software keyboard. The flipped margin now keeps the list's end above the keyboard, and its top on screen. That margin applies only where it would not also fit below the anchor. Where it would, the browser moves the layer back below, and a flipped margin there would squeeze the list. There the overlay keeps main's margin. Two SelectorKeyboardInset cases fix the field 8 px above the viewport's end, with the keyboard up before the open and rising while the list is open. A story sets a field 300 px above the screen's end for a phone check, and a browser spec pins it beside a 291 px keyboard. * fix(Selector): shrink a tall list above the software keyboard A list taller than the room above a software keyboard, beside a field near the viewport's end, stayed under the keyboard. The flipped margin stopped the list's top at 0, with no room for the layer's gutter. So the browser dropped that position, and the runtime caps no layer above its trigger. At the open, the overlay now always takes the margin below the anchor, as main does. That margin fits below the anchor, so the browser opens the layer there, and the runtime caps it above a keyboard. Only a layer that the browser flips while the list is open gets the flipped margin, because the browser keeps that side. Its top stays below the gutter. Two SelectorKeyboardInset cases open the nine-option story at 844x390 beside a 200 px keyboard, up before the open and rising while the list is open. * fix(Selector): read the layer's gutter from the margin it keeps The overlay read the layer's gutter as the larger of its two block margins. A flip swaps them, so that read could take the overlay's own margin: with a keyboard up, 270 px. A flipped list that grew again then stopped at that floor, past the keyboard's line. The gutter is now the margin that the overlay does not set: the block-end margin below the anchor, and the block-start margin above it. The unit case for a flipped layer's gutter now also names the flip in the layer's position area. A SelectorKeyboardInset case flips the list with a grown option, raises a keyboard, and grows another option. * Merge main * test(Selector): raise the keyboard story's trigger above Safari's bars With the keyboard up, an iPhone tap on a trigger just above Safari's bottom bars closed the keyboard and opened nothing, and the keyboard story's trigger sat there. The story now lays out its Selector as Overlay Beside Keyboard does, so its trigger sits at the same height. The browser spec now fixes the field 300 px above the viewport's end itself, so it still pins the same case. * Merge main * Merge main * Merge main * docs(Selector): record the Android landscape evidence gap FR2's verification row now names the case no emulator scene can set up: Android landscape with the keyboard up leaves 67 px visible and 40 px of scroll, at this head and on main alike.
Depends on #8342 and its per-event hold offer (#8342 (comment)). Review only this PR's change: vjeux/astryx@0f68401...7aa9117
Why
On a phone, a tap that lands while a Dialog or a Drawer is still entering closes it, runs the button under the finger, or reaches the page; a drag scrolls its content, or the page beside a non-modal drawer. The person loses what they just opened.
What led to it
Part of the touch-presentations program (
spec:AST-094). UIKit delivers no touch until a presentation finishes, and FR35, as amended by #8618, asks the same of Astryx. Dialog and Drawer enter through CSS and take every input from the first frame.Options and tradeoffs
holdInput: a finger's or a pen's press reaches nothing until the entrance ends; keyboard, screen readers and a mouse are untouched, even on a touch screen. The cost is size: Dialog and Drawer now load the shared hold.Why this choice
The second is what FR35 asks, and deciding per event keeps a mouse on a touch screen unchanged too. The hold lasts exactly as long as the layer's own entrance animations, read with
getAnimations()as it opens, so a theme's duration, Reduce Motion or a close midway ends it with them. No API, style or default changes.How to check it
In Chrome's or Safari's phone emulation, on the Dialog stories (the Drawer stories behave the same):
Evidence
touch-support-bundlefails its root-entry case because Dialog and Drawer now reach the gesture host through the hold; test(core): a touch component's import carries its gesture code, and nothing else does #8671's per-component test replaces it and passes here.