You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Scrolling up a long thread on iPhone jerks backwards: LegendList's scrollBy corrections are overwritten during a drag and applied twice during momentum #22350
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Open the web client on an iPhone (Mobile Safari, or any iOS browser, since they all use WebKit).
Open a thread long enough that its earlier messages are not yet rendered, then swipe up a few times with normal flicks to read older messages.
Expected behavior
The timeline follows the finger and coasts smoothly to a stop, as any scrolling page does.
Actual behavior
The content jerks: during a swipe or while it coasts, it jumps backwards by tens to hundreds of pixels in a single frame, and the coast often stops early. It happens on most swipes once older rows start rendering above the screen.
Cause, measured with a probe that logged every scroll write on the timeline scroller during 12 swipes: LegendList measures rows as they render above the viewport and, through maintainVisibleContentPosition.size, calls scrollBy on the scroller with the size difference to keep the visible rows still. iOS WebKit scrolls overflow elements outside the page, and such a scrollBy goes wrong in two ways:
While the finger is down, the drag overwrites it. Example: scrollBy(382) from 3398 read back 3780, and the next scroll event reported 3305. The rows had moved 382 px but the scroll position had not.
During momentum, it lands twice. Example: scrollBy(554.75) from 4565 read back 5119, and the next scroll event reported 5621.
Correction to the capture labels: the reported 12-swipe comparison used the first fix build (1ed789d2 on base 67c0fc0) with touch deferral disabled versus enabled by a probe-only flag in the installed package. It was not a separate main-build comparison; a separate main-build iOS capture is still missing. The existing media's main/before labels refer to the deferral-disabled mode.
With deferral disabled, the 12 swipes produced 16 such writes, 9 of them with the finger down. On screen that showed as 8 frames where the content jumped backwards, the largest by 382 px. Desktop Chromium is not affected: there the same scrollBy applies once.
(The chart shows eight swipes; the totals above cover 12 swipes. Its main/before and fix/after labels refer to deferral disabled and enabled.)
Recording with deferral disabled in the first fix build (filler text, iPhone 17 simulator): before.mp4
Impact
Major degradation or frequent failure
Version or commit
Instrumented fix build 1ed789d2 on main 67c0fc0, with deferral disabled for the before capture; separate qualitative observation on 0.1.1-nightly.20261020.3386
Environment
iPhone 17 simulator, iOS 26.3, Mobile Safari, real touches through XCUITest; also a physical iPhone 16 Pro, iOS 26.6.2, Chrome for iOS 154 (WebKit), against a Nightly 3386 server
Tested current main 70e5e384da in Mobile Safari on an EAS iPhone 17 simulator, using the real web dev server and an isolated database with long filler messages. Ran 4 upward finger swipes, 12 downward flicks, then loaded earlier turns and ran 20 more downward flicks.
Verification is incomplete: both EAS sessions lost their automation daemon; the older-history recording failed to export, and recovering the full-session recording returned HTTP 403. The VM also logged 9–24-second server event-loop stalls. The saved recording covers the latest-turn pass, so it does not establish whether the reported older-row correction bug occurs on current main.
Can you share the sanitized fixture/seeding script and scroll-write probe used for the reported 12-swipe capture? Those would let us replay the same row sizes and check the overwritten/doubled corrections independently of simulator recording failures. Leaving this open pending that verification.
Thanks for trying it. I traced the original capture and need to correct one label: the reported “main” numbers and before.mp4 used the first fix build (1ed789d2 on 67c0fc0), with touch deferral disabled by a probe-only flag in the installed package. That exercised the original scrollBy path, but it was not a separate main build. A separate main-build iOS capture is still missing.
The measurement kit contains the probe reconstructed from the original commands, the collector, the two recorded logs, analysis and the gesture sequence: open the thread, wait 35 seconds, then twelve XCUITest swipeDown() calls on Safari's web view, 1.5 seconds apart. The logs reproduce 16 scrollBy calls (9 with a finger down) and 8 backward frames, up to 382 px, with deferral disabled, versus zero of each with it enabled.
There was no seeding script. The 637-message fixture was copied from development data, and its scrub was incomplete, so I cannot share that database. The kit includes a content-free message profile, but it does not reproduce the exact rows or their layout. I have checked the instrumentation in Chromium; I have not replayed the iOS capture or validated a fixture import.
Activity
juliusmarminge commentedon Oct 22, 2026
Tested current main 70e5e384da in Mobile Safari on an EAS iPhone 17 simulator, using the real web dev server and an isolated database with long filler messages. Ran 4 upward finger swipes, 12 downward flicks, then loaded earlier turns and ran 20 more downward flicks.
Verification is incomplete: both EAS sessions lost their automation daemon; the older-history recording failed to export, and recovering the full-session recording returned HTTP 403. The VM also logged 9–24-second server event-loop stalls. The saved recording covers the latest-turn pass, so it does not establish whether the reported older-row correction bug occurs on current main.
Latest-turn recording · gesture telemetry
Can you share the sanitized fixture/seeding script and scroll-write probe used for the reported 12-swipe capture? Those would let us replay the same row sizes and check the overwritten/doubled corrections independently of simulator recording failures. Leaving this open pending that verification.
mkantautas commentedon Oct 22, 2026
Thanks for trying it. I traced the original capture and need to correct one label: the reported “main” numbers and before.mp4 used the first fix build (1ed789d2 on 67c0fc0), with touch deferral disabled by a probe-only flag in the installed package. That exercised the original scrollBy path, but it was not a separate main build. A separate main-build iOS capture is still missing.
The measurement kit contains the probe reconstructed from the original commands, the collector, the two recorded logs, analysis and the gesture sequence: open the thread, wait 35 seconds, then twelve XCUITest swipeDown() calls on Safari's web view, 1.5 seconds apart. The logs reproduce 16 scrollBy calls (9 with a finger down) and 8 backward frames, up to 382 px, with deferral disabled, versus zero of each with it enabled.
There was no seeding script. The 637-message fixture was copied from development data, and its scrub was incomplete, so I cannot share that database. The kit includes a content-free message profile, but it does not reproduce the exact rows or their layout. I have checked the instrumentation in Chromium; I have not replayed the iOS capture or validated a fixture import.