Text selection doesn't work in WKWebView on macOS Sonoma

Can not select anything within WkWebView editor view of my MacCatalyst app when running on macOS 14 Sonoma.

Any selection gesture or command key fails to select anything in content editable WKWebView, so none of the Editor tools can be activated.

My application uses the nnhubbard / ZSSRichTextEditor WKWebView-based Rich Text Editor: https://github.com/nnhubbard/ZSSRichTextEditor. The app is built with Xcode 15.4.

The app is a Catalyst app that implements an editor view with a ZSSRichTextEditor WKWebView.

The problem does not occur if the the app is run in macOS 11, 12, or 13 (Catalina, Monterey, or Ventura.) The issue only occurs in macOS 14 Sonoma.

The following error message is logged whenever an attempt to select any text in the WKWebView content:

0x1359ecc18 - [pageProxyID=14, webPageID=15, PID=14,932] WebPageProxy::didFailProvisionalLoadForFrame: frameID=1, isMainFrame=1, domain=NSURLErrorDomain, code=18,446,744,073,709,550,614, isMainFrame=1, willInternallyHandleFailure=0

Without the ability to select text the editor (WKWebView) is useless since no editing tool can be invoked without a selection.

An Apple Feedback report was filed: FB13344011.

An incident was filed with DTS concerning this issue. Apple Developer Technical Support's reply was "Our engineers have reviewed your request and have determined that you are experiencing a known issue for which there is no known workaround at this time."

Since DTS’ reply there has been no further response from them.

Answered by goofyfooter in 802359022

Apple Feedback FB14734097 — macOS provided a fix. The fix is posted to https://stackoverflow.com/a/78945775/1911037

This is almost certainly a bug report. Please file and follow up there. You can also probe userInteractionEnabled to make sure the WKWebView itself is editable (which you've probably done).

Apple Engineer, thanks for your post.

Yes, [self.view isUserInteractionEnabled] is TRUE;

I filed a Feedback report, FB13344011, November 2023, and it wasn't until April of this year that Apple Feedback requested more information. At that time I provided 2 screencasts illustrating the non-existence of the bug on Ventura, and its existence on Sonoma. I also provided a copy of the App. Since then there has been no interaction from Apple––not even an acknowledgement of the information I sent.

Where else can I file a bug report?

Can confirm we're facing the same bug

Are you seeing in all versions of Sonoma?

Issue still exists in macOS 15 Sequoia Developer Beta 5.

Correction. Feedback Report ID: FB13354011, not FB13344011

Accepted Answer

Apple Feedback FB14734097 — macOS provided a fix. The fix is posted to https://stackoverflow.com/a/78945775/1911037

Text selection doesn't work in WKWebView on macOS Sonoma
 
 
Q