Home:ALL Converter>macOS macCatalyst WKWebView text selection behavior

macOS macCatalyst WKWebView text selection behavior

Ask Time:2020-04-15T03:24:10         Author:Johannes Fahrenkrug

Json Formatter

The text selection behavior in a WKWebView seems wrong when compiled with macCatalyst. Normally it's possible to expand and contract a selection. In a WKWebView on macCatalyst it seems that it's impossible to contract the selection. This is happening with Xcode 11.4 (11E146) on macOS Catalina 10.15.4.

Is this just a bug? Or is there a workaround?

Behavior in macCatalyst WKWebView

macCatalyst behavior

Behavior in macOS Safari

enter image description here

The only thing the macCatalyst app does is load a WKWebView from a storyboard and then load a website using this line of code:

webView.load(URLRequest(url: URL(string: "https://developer.mozilla.org/en-US/docs/Web/CSS/cursor")!))

Any ideas?

Author:Johannes Fahrenkrug,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61215569/macos-maccatalyst-wkwebview-text-selection-behavior
yy