Set the scroll position via JavaScript and then immediately check it and it seems to work correctly but under heavy load it actually REVERTS to a previous scroll position on the next requestAnimationFrame()! From what I can tell, it's definitely a bug. Here is the proof (you must run this on iOS Safari in the /debug/ window of CodePen so that it's not in an iframe): https://codepen.io/GreenSock/pen/16c435b12ef09c38125204818e7b45fc?editors=0010 Again, this only happens under heavy load. I understand JS runs on a separate thread from scrolling but all of this is happening in JS world so the regression of the scroll position doesn't make sense to me. Can anyone explain why this is happening and how we can work around it?
<rdar://problem/88943486>
Created attachment 452091 [details] Testcase I couldn't get the codepen to load in debug mode, so here's it attached. <rdar://88342742>
Scrolling on iOS involves an asynchronous round-trip to a different process, and it's possible we're getting a stale scroll position back to JS because of that. I don't know of any workarounds currently.
Are there any intentions to look into this?