[Webkit-unassigned] [Bug 173901] New: iOS 10.3 Safari bug with overflow and focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 27 19:50:51 PDT 2017


            Bug ID: 173901
           Summary: iOS 10.3 Safari bug with overflow and focus
           Product: WebKit
           Version: Other
          Hardware: iPhone / iPad
               URL: http://output.jsbin.com/nawumetofo/
                OS: iOS 10.3
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: scottjehl+webkit at gmail.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

In the recent iOS 10.3 update, some safari changes seemingly happened with overflow scroll elements so that they scroll to 0,0 when they are tapped or gain focus. The link below demonstrates the behavior. 

To reproduce, just load this link, and after 5 seconds the div will gain focus and jump to 0, despite having a pre-set scroll left value. If you scroll the area manually before then, it’ll stay put to whatever you choose, suggesting iOS treats user-intiated scroll differently than programatic scroll. 

This jump to zero does not happen in iOS 9.3. Notably, if you drag-scroll the scroller manually, a subsequent user tap will not reset the scroll. So it seems focus related, but I can't seem to prevent the jump by binding to focus and preventing default…. 

Source here:

Side notes: 
- I’m able to reproduce the issue by programmatically scrolling the element, then focusing it after a timeout, so user interaction is not necessarily required.
- If I remove the tab index on the div, it sometimes fixes the behavior, but doesn’t seem to fix it reliably, and we need a tab index to support keyboard interaction of our scroller anyway.
- If I bind to focus, I can get log expected scrollLeft value of the element before it jumps to 0. But again, preventDefault or stopImmediatePropagation does not prevent the jump.
- preventDefault on touchStart or using CSS pointer-events:none will disable the jump, but also disables the scroller so it’s not a fix.
- For the bug to show, it seems to require that CSS snap points are applied. The bug will not occur on just overflow: auto or webkit-overflow-scrolling.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170628/c52f0447/attachment.html>

More information about the webkit-unassigned mailing list