Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard is broken on Mac Catalyst WebView #977

Open
cyanzhong opened this issue Oct 22, 2022 · 1 comment
Open

Clipboard is broken on Mac Catalyst WebView #977

cyanzhong opened this issue Oct 22, 2022 · 1 comment

Comments

@cyanzhong
Copy link
Contributor

cyanzhong commented Oct 22, 2022

Describe the issue

Mac Catalyst is a technique introduced by Apple to bring iOS apps to Mac, it uses UIKit instead of AppKit even when running on macOS.

That being said, a WKWebView on macCatalyst inherits from UIView, which behaves differently in some ways compared to the native WKWebView on Mac apps.

I tested CodeMirror on Monterey running on Mac Catalyst, and it seems copying content from the editor doesn't work (cannot paste into other places).

The root cause seems that we need to enable brokenClipboardAPI even when browser.ios && browser.webkit_version < 604 gives us false: https://github.com/codemirror/view/blob/main/src/input.ts#L352

I can help get more info regarding system versions and SDK versions if you want to fix this (e.g., whether this is fixed in Ventura), totally understand the priority since using Mac Catalyst is already a niche choice.

Exactly the same phenomenon happens in ProseMirror too.

Browser and platform

WKWebView on Mac Catalyst

Reproduction link

No response

@masegraye
Copy link

FYI - the recently released .NET MAUI Blazor Hybrid stuff from Microsoft uses Mac Catalyst for compiling to macOS, so you may see more of this issue. (I just came across this myself, trying exactly this.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants