-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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 access in webviews in Codespaces #115935
Comments
@Tyriar I just tested this in Chrome on setInterval(async () => {
try {
const c = await navigator.clipboard.readText();
console.log(c)
} catch (e) {
console.error(e);
}
}, 1000); This fails if the webview is not focused but works properly when the document is focused @Tyriar Are you still running into this? If so, can you share more details about how to reproduce |
Codespaces had blocked |
@Tyriar Did you get a chance to test this now that Luna Paint is running on web? |
Can't test yet as I get a CSP problem when I try to load in github.dev/codespaces
Need to publish first |
Got it working by installing the vsix, both copy and paste don't work in codespaces and there are no errors in the console when I do them. |
It would be nice to get some testing around clipboard access in custom webviews as it's broken several times now |
What browser are you using? A minimal example works fine for me in chrome. However on safari I see:
There is never a visible prompt so I'm not sure what safari needs here |
This was in latest Edge on Windows |
Right now using
navigator.clipboard
gets rejected inside a webview editor in a Codespace.The text was updated successfully, but these errors were encountered: