[Webkit-unassigned] [Bug 182710] New: WKWebView window.scrollTo() scrolls to wrong position depending on contentInsetAdjustmentBehavior setting

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 12 15:10:53 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182710

            Bug ID: 182710
           Summary: WKWebView window.scrollTo() scrolls to wrong position
                    depending on contentInsetAdjustmentBehavior setting
           Product: WebKit
           Version: Safari 11
          Hardware: iPhone / iPad
                OS: iOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zwaugh at gmail.com

Created attachment 333635

  --> https://bugs.webkit.org/attachment.cgi?id=333635&action=review

Sample project

When a WKWebView on iOS 11 uses the default `contentInsetAdjustmentBehavior`, then calls to `window.scrollTo()` don't work correctly. Specifically, `window.scrollTo(0, 0)` will not scroll all the way to the top, leaving content sitting beneath the nav bar. When `contentInsetAdjustmentBehavior = .never` and the content insets are manually set, `window.scrollTo(0, 0)` scrolls to the correct place. In both cases, the actual contentInset is correct, just depends on the adjustment behavior.


I've attached a sample project that reproduces, and is also on GitHub - https://github.com/zachwaugh/wkwebview-bugs/tree/master/ScrollToContentInset

-- 
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/20180212/e7bcfe64/attachment.html>


More information about the webkit-unassigned mailing list