| Summary: | iOS VisualViewport scroll events fire only when scrolling finishes | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darryl Pogue <dvpdiner2> | ||||
| Component: | Scrolling | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | cdumez, pjwiebe, simon.fraser, smoley, stephen, thorton, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 14 | ||||||
| Hardware: | iPhone / iPad | ||||||
| OS: | Other | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=226354 | ||||||
| Attachments: |
|
||||||
|
Description
Darryl Pogue
2020-11-02 15:53:54 PST
Test case: https://jsfiddle.net/5kgxab17/ I'm not sure how to interpret the tescase. Darryl, could you make it clearer? The VisualViewport only fires 'scroll' events when the visual viewport changes relative to the layout viewport. That only happens when zoomed, and possibly when some resizing because of the keyboard happen. Created attachment 430226 [details] iOS Test Case (In reply to Simon Fraser (smfr) from comment #3) > I'm not sure how to interpret the tescase. Darryl, could you make it clearer? Hi Simon, I've put together a clearer test case for iOS that demonstrates the problem. GitHub: https://github.com/dpogue/webkit-bug-218465-testcase Source with Xcode project also attached as a zip file. If you compare the values of window.scrollY and window.visualViewport.offsetTop in an window.onscroll event handler the offsetTop values typically do not update until after the scroll motion completes, whereas the window.scrollY values update continuously throughout the scrolling motion. This makes the scroll event handler much less useful and work in an unexpected way. Pull request: https://github.com/WebKit/WebKit/pull/29531 |