You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clipboard API doesn’t work on Codespaces (using Safari) #106997
It seems the Clipboard API is not working, at least using Safari
Create an extension using the Clipboard API which as documented, should be used on Remote Development: env.clipboard.writeText(editor.document.getText(editor.selection));
Open Codespaces and install the extension (My alefragnani.copy-word extension does exactly that)
Use its command Copy Word: Copy, which will select the word where the cursor is located and should copy the selected text to clipboard
Navigate to other location
Run Paste command (or use Cmd V shortcut)
Doesn’t work: instead of pasting the the newly selected/copied text, it pastes the previous clipboard content (not created using the extension)
I tested on iPadOS 13 and MacOS Catalina and it fails.
I tested on Edge (Chromium) and it works perfectly (I guess it should work on Chrome too)
I didn’t test on Firefox (yet).
BTW, I tried to debug my extension on Codespaces (on iPadOS), but it seems not possible/supported. I’m able to build the extension and hit the Debug button. The Debug toolbar appears but no [development ] window/tab appears. Is there a way to debug VSCode extensions right from Codespaces?.
As described below, debugging on Desktop (macOS Catalina) works just fine. Safari just blocks the window, but you click the button and the [development ] window correctly appears.
Does this issue occur when all extensions are disabled?: Yes
BTW, I tried to debug my extension on Codespaces, but it seems not possible/supported. I’m able to build the extension and hit the Debug button. The Debug toolbar appears but no [development ] window/tab appears. Is there a way to debug VSCode extensions right from Codespaces?
Yes, it should open a new tab. Maybe it was blocked?
Sorry about not updating the description properly. I tested debugging again later (yesterday) and indeed it was blocked by Safari, but only on Desktop (macOS Catalina). On iPadOS, it doesn't display anything (neither a blocked windows warning/icon), so I couldn't debug, yet.
Activity
[-]Clipboard API doesn’t work on Codespaces[/-][+]Clipboard API doesn’t work on Codespaces (using Safari)[/+]alefragnani commentedon Sep 18, 2020
Updated the description and comments. Testing on Edge (Chromium) worked just fine.
bpasero commentedon Sep 21, 2020
Alessandro Fragnani (@alefragnani)
Yes, it should open a new tab. Maybe it was blocked?
alefragnani commentedon Sep 21, 2020
Hi Benjamin Pasero (@bpasero) ,
Sorry about not updating the description properly. I tested debugging again later (yesterday) and indeed it was blocked by Safari, but only on Desktop (macOS Catalina). On iPadOS, it doesn't display anything (neither a blocked windows warning/icon), so I couldn't debug, yet.
I'll update the description. Thanks
alefragnani commentedon Sep 24, 2020
Benjamin Pasero (@bpasero) I think the safari label should remain, because the issue is happening using Safari, both on MacOS and iPadOS.
7 remaining items
TylerLeonhardt commentedon Aug 27, 2021
Just hit this in microsoft/vscode-pull-request-github#2965.
TylerLeonhardt commentedon Jan 3, 2022
verification steps:
GitHub Issues: Copy GitHub PermalinkcommandYour clipboard should contain the copied permalink now.
Bonus points: make sure Edge or Chrome still also work.
alefragnani commentedon Jan 4, 2022
Hi TylerLeonhardt ,
I’m glad to report that it is also working on iPadOS 15.2 and MacOS Big Sur 🚀
I just tested my Copy Word extension (the reason why I opened this issue) and it is working perfectly.
Thank you!