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 · 0 comments

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
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

1 participant