Skip to content

Commit e4684e7

Browse files
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
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[chore] On iOS, a touch on an element the compositor animator is moving reaches what is drawn: the animator reports each moving element's offset from its layout box, and the gesture host sends the touch, press bounds and the tap's click there instead of to the layout position iOS WebKit hit-tests.
6+
7+
@vjeux

0 commit comments

Comments
 (0)