Repository navigation
Commit 35ad56d
authored
fix(virtual-core): stop a touch fling for a command issued during it on Android too (#1347)
Chrome on Android carries a fling on from a programmatic write, so a
scrollToIndex / scrollToOffset / scrollToEnd issued mid-fling was written
and then overshot (Pixel 6, Android 16, Chrome 156: ~3,200px past the
target, 3 runs of 3). iOS 27 already stops the fling before such a command
(#1332); this does it everywhere a write does not end the fling, which is
everywhere but iOS 26 and earlier.
- IosGesture opens the post-touch tail on every platform. Corrections are
still deferred through it on iOS only; `_canWriteScroll` and
`_awaitingCommandReadBack` keep their isIOSWebKit() gates.
- `_startScroll` stops the fling when momentumOverridesWrites():
!isIOSWebKit() || iosMomentumOverridesWrites().
- `_stopMomentum` puts the overflow back in the same task when hiding it
changed the element's cross-axis client size: a classic scrollbar (a
touchscreen laptop) would vanish and reflow the content for two frames.
The command then waits for the tail, as without a style.
The web trace snapshots move for seeds with touch steps: a command inside
a drag's tail now goes through the stop, which in the simulator (no style)
falls back to the tail, as on ios27.1 parent 979c1b4 commit 35ad56d
7 files changed
Lines changed: 213 additions & 93 deletions
File tree
- .changeset
- packages/virtual-core
- src
- tests
- __snapshots__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
2244 | 2240 | | |
2245 | 2241 | | |
2246 | 2242 | | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
2252 | | - | |
2253 | | - | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
2254 | 2250 | | |
2255 | 2251 | | |
2256 | 2252 | | |
| |||
2270 | 2266 | | |
2271 | 2267 | | |
2272 | 2268 | | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
2273 | 2272 | | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
2274 | 2280 | | |
2275 | 2281 | | |
2276 | 2282 | | |
| |||
2490 | 2496 | | |
2491 | 2497 | | |
2492 | 2498 | | |
2493 | | - | |
2494 | | - | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
2498 | 2506 | | |
2499 | 2507 | | |
2500 | 2508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
| |||
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
111 | | - | |
112 | | - | |
113 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
| |||
203 | 216 | | |
204 | 217 | | |
205 | 218 | | |
206 | | - | |
| 219 | + | |
207 | 220 | | |
208 | 221 | | |
209 | | - | |
| 222 | + | |
210 | 223 | | |
211 | 224 | | |
212 | 225 | | |
| |||
0 commit comments