Bug 260934

Summary: Element#scroll() breaks rendering while inertial scroll happens
Product: WebKit Reporter: Tomas Roggero <tomasloon>
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   

Description Tomas Roggero 2023-08-30 17:03:15 PDT
Steps to reproduce:
1. Open https://jsbin.com/wekikog in Safari iOS 16
2. Scroll with your finger fast (so inertial scrolling of the div happens)
3. While inertial scrolling is slowing down, press the SCROLL(500) button. This button calls `element.scroll(0, 500)` where `element` is the scrollable DIV.

Current behavior:
The entire scrollable DIV scrolls to the proper Y position but becomes WHITE.

Expected behavior:
The scrollable DIV should not become WHITE.

NOTES:

1) This seems to only happen at certain speeds, if the inertial scrolling is going slow enough, rendering doesn't break.
2) This is reproducible in both the Xcode Simulator as well as physical devices
3) Calling `element.scroll(0, 500)` after inertial finished works as expected
Comment 1 Tomas Roggero 2023-08-30 17:10:00 PDT
`scroller.scroll({left: 0, top: 500, behavior:'instant'})` has the bug

`scroller.scroll({left: 0, top: 500, behavior:'smooth'})` works as expected

Definitely something there.
Comment 2 Radar WebKit Bug Importer 2023-08-30 18:17:13 PDT
<rdar://problem/114735570>