Bug 200869

Summary: Multiple scroll events during one requestAnimationFrame cycle
Product: WebKit Reporter: alex
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Major CC: alex, rniwa, sabouhallawa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: macOS 10.14   
Bug Depends on:    
Bug Blocks: 202843    
Attachments:
Description Flags
Test none

alex
Reported 2019-08-18 09:46:23 PDT
Safari dispatches multiple scroll events during one requestAnimationFrame "cycle". But the scroll event should be limited to the rAF. Steps to reproduce: 1. open page: Demo: https://jsbin.com/joculitacu/edit?console,output 2. Scroll the page What you see: You see multiple outputs `bug.` inside of the console. What I expect: No output. To me it is not entirely clear wether this is a bug with the scroll event or the rAF.
Attachments
Test (5.83 KB, text/html)
2021-10-15 16:30 PDT, Simon Fraser (smfr)
no flags
Radar WebKit Bug Importer
Comment 1 2019-08-18 11:36:32 PDT
alex
Comment 2 2019-08-19 01:30:34 PDT
Here you find an updated testcase: https://jsbin.com/wiyehev/edit?console,output The old one said "success." although it is a bug. Having multiple scroll events in one render cycle can lead to performance problems and layout thrashing. Additionally it is not standard complaint. This bug only occurs in Safari not in Chrome, FF or Edge.
Simon Fraser (smfr)
Comment 3 2021-10-15 16:30:05 PDT
I suspect this only happens in cross-origin iframes where rAF is throttled to 30fps. Does it happen in the main frame? Attaching your testcase as an HTML file.
Simon Fraser (smfr)
Comment 4 2021-10-15 16:30:16 PDT
Note You need to log in before you can comment on or make changes to this bug.