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.
<rdar://problem/54446269>
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.
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.
Created attachment 441451 [details] Test