Hello, in latest version 13.4.1 adding such code visualViewport.addEventListener("scroll", function(q) { ***** etc. function fires permanently after zoom or orientation change. It fires it approximately ~5 times a second continuously without stop. Not even page refresh helps to stop firing, after page refresh it continues to fire scroll event non-stop! Sincerely yours.
<rdar://problem/62939371>
Can you attach a testcase, or point to a URL that shows the issue? Thanks.
Created attachment 398706 [details] requested attachment Reproducer case. 1. on iOS 13.4.1 Safari open viewportScroll.html 2. zoom in now "scroll" event fires continuously non stop You can zoom out again, that doesn't matter, it will fire this event continuously. If you don't zoom out back but just refresh the page then issue continues too.
zoom-in with two finger gesture
Thank you.
Also reproduces on macOS.
Stupid coding error: if (m_needsVisualViewportScrollEvent) { LOG_WITH_STREAM(Events, stream << "Document" << this << "sending scroll events to visualViewport"); m_needsVisualViewportResizeEvent = false; Should be m_needsVisualViewportScrollEvent = false. Also all the double comparisons in VisualViewport::update() should probably be a bit more lenient.
Created attachment 403390 [details] Patch
Comment on attachment 403390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403390&action=review > LayoutTests/fast/visual-viewport/scroll-event-fired-during-scroll-alone.html:36 > + }, "Verify that a scroll event gets fired on window.visualViewport when its offset changes"); This text doesn't seem right. You're verifying that only one scroll event fires.
(In reply to Simon Fraser (smfr) from comment #9) > Comment on attachment 403390 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=403390&action=review > > > LayoutTests/fast/visual-viewport/scroll-event-fired-during-scroll-alone.html:36 > > + }, "Verify that a scroll event gets fired on window.visualViewport when its offset changes"); > > This text doesn't seem right. You're verifying that only one scroll event > fires. Oops, leftover from a test I copied.
Created attachment 403392 [details] Patch for landing
Committed r263858: <https://trac.webkit.org/changeset/263858> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403392 [details].