Repository navigation
Commit e4684e7
committed
fix(core): on iOS a touch reaches what is drawn on a moving element
iOS WebKit hit-tests an element a compositor animation moves where the
animation started: it keeps the transform it resolved when the animation
went to the compositor, so event targets, elementFromPoint and
getBoundingClientRect stay there for the whole curve (iOS 26.2, measured),
though the inline style holds the end and the computed style is live. A
finger on a settling sheet landed on whatever sat under the sheet's start;
an upward release could hit the scrim and close it. A style write on the
element resolves the transform again, to the value drawn then. UIKit keeps
an interruptible animation hit-testable where it is drawn.
The animator now reports each element whose translate is moving to
motion/presentation.ts: its offset (the curve now minus the value the
engine last resolved, read live) and a resolve (one custom-property write).
On iOS WebKit the gesture host resolves the moving elements at touch-down
and asks the engine what is under the finger, so the touch goes to what is
drawn; press trackers read their bounds through presentedRect; a
retargeted tap cancels the engine's click and clicks what it touched once
(the swallower drops a late engine click). Translation only; scale, rotate
and CSS transitions the animator did not start are not covered.1 parent ec8ba40 commit e4684e7
12 files changed
Lines changed: 1056 additions & 14 deletions
File tree
- .changeset
- packages/core/src
- gestures
- __tests__
- browser
- motion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments