Bug 186333 - Selecting a line in a contenteditable in WKWebView breaks scrolling (iOS 11.3 and 11.4)
Summary: Selecting a line in a contenteditable in WKWebView breaks scrolling (iOS 11.3...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-05 19:47 PDT by hongping
Modified: 2019-04-09 11:09 PDT (History)
5 users (show)

See Also:


Attachments
Project to reproduce the issue (27.19 KB, application/zip)
2018-06-05 19:47 PDT, hongping
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description hongping 2018-06-05 19:47:50 PDT
Created attachment 342023 [details]
Project to reproduce the issue

To reproduce the bug:

1. unzip and open the project in Xcode 9.4
2. run the app using iOS simulator 11.3
3. click on the text "testing"
4. type about 15 lines or so with multiple words
5. On the last line with multiple words, select the entire line
6. With the line still selected, try to scroll upwards

Expected
Able to scroll up

Actual
The scrolling keeps jumping back down, as if to keep the selection in view. Even after removing the selection, scrolling upwards still keeps jumping back down.

Screen recording:
https://cl.ly/2e1j1P0D2h0u

Additional details

The issue doesn't happen on iOS 11.2, only 11.3 and 11.4 currently.

In the attached zip file, the view controller creates a WKWebView instance that loads the following HTML string to construct a contenteditable div.

        let html = "<div contenteditable=\"true\">Testing</div>";
        webView.loadHTMLString(html, baseURL: nil)
Comment 1 Radar WebKit Bug Importer 2018-06-05 19:49:55 PDT
<rdar://problem/40834726>
Comment 3 bruno.onlyme 2018-06-24 17:21:38 PDT
Q can anybody tell us what we "call to refresh" standard behaviour?
Comment 4 Simon Fraser (smfr) 2019-04-09 11:09:08 PDT
This is a bug in another framework, not WebKit, and will be fixed in a future OS update.