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

[Bug] Safari: non-https site reports undefined is not an object (evaluating 'navigator.clipboard.write') #4496

Open
wxiaoguang opened this issue May 5, 2024 · 1 comment

Comments

@wxiaoguang
Copy link

wxiaoguang commented May 5, 2024

Reproduction Steps

  • Use monaco-editor on a "http" site (v0.48.0), (do not use localhost, use local IP like http://192.168.1.20)
  • Use Safari to open the page, input anything
  • Then navigator.clipboard.write triggers the bug
    installWebKitWriteTextWorkaround() {
        const handler = () => {
            ....
            navigator.clipboard.write([new ClipboardItem({ // !!!!!!!!!!!!!! BUG HERE !!!!!!!!!!!!!!!!!!!!!
                    'text/plain': currentWritePromise.p,
                })])
            ....
        };
@wxiaoguang wxiaoguang changed the title [Bug] Non-https site reports undefined is not an object (evaluating 'navigator.clipboard.write') [Bug] Safari: non-https site reports undefined is not an object (evaluating 'navigator.clipboard.write') May 5, 2024
@SuperManito
Copy link

I have the same problem.

After testing, it can be reproduced from at least version 0.47.0.

The error can be reproduced using the UA of Apple mobile devices and under the HTTP protocol. But it was not reproduced in the dev environment. http://localhost

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