[Webkit-unassigned] [Bug 209821] New: Changing WKWebView ScrollView’s contentInset results in wiggle while selecting a text inside content editable <div>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 31 10:44:29 PDT 2020


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

            Bug ID: 209821
           Summary: Changing WKWebView ScrollView’s contentInset results
                    in wiggle while selecting a text inside content
                    editable <div>
           Product: WebKit
           Version: Safari 13
          Hardware: iPhone / iPad
                OS: iOS 13
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: UI Events
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ssk.mohan at gmail.com

Created attachment 395064

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

Sample iOS Project

I have UIViewController subclass hosting WKWebView on its view’s entire bounds. Content inset of WKWebView scrollview is set to UIEdgeInsetsMake(200,0,0,0) to accommodate a header view.

WKWebView is loaded with a webpage that contains single content editable div tag.

Eg.
<html>
<head>
<body>
<div contenteditable="true">Add content here</div>
</body>
</head>
</html>

When I type some text in the editable area and start selecting the text by double tap and selection handle drag WKWebView’s scroll view starts to moves up and down continuously.

Is it okay to change content inset of WKWebView's scroll view ? 

Tried alternate approach below,
I thought its allowed since scrollview content inset is adjusted in other scenraios like safe area insets(eg. content inset of scrollview is adjusted automatically if WebView underlaps UINavigationBar).

I tried by setting ViewController's additionalSafeAreaInsets property to UIEdgeInsetsMake(200.0, self.additionalSafeAreaInsets.left, self.additionalSafeAreaInsets.bottom, self.additionalSafeAreaInsets.right); and the issue is not observed in this scenario but the only problem is scrollview ignores any interaction that happen in top 200 pixels so, scroll won't happen while dragging inside 0 to 200.

-- 
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/20200331/83336259/attachment-0001.htm>


More information about the webkit-unassigned mailing list