Closed sneighbors closed 2 months ago
Sorry for the long delay for triaging. Does Home Assistant pull in code-server through an iframe? Do you see any error logs in the browser console? I wonder if it is missing the allow
to make the clipboard API work (although not sure that is required for same-origin frames). Does it work if you open code-server directly without an iframe?
Just noticed when I opened today a little popup - so I'm guessing the paste function is what that is referring to. Makes it kind of pointless when you are using this to make edits to scripts and other yaml files for configuring Home Assistant.
But having tried today to reproduce it no longer reproducible. I'm able to cut/copy/paste at least in the one scripts.yaml file I opened.
Ahh yeah browsers only allow access to the clipboard API over secure contexts; as a tangent we need to remove that wishy-washy popup and show a more concrete message when there is actually a failed attempt to use APIs restricted by the browser.
In any case, I think Microsoft must have reworked things not to use the clipboard API, because I experimented a bit just now and even after disabling the clipboard API copy/paste is still working for me, and I am pretty sure that was not always the case.
Is there an existing issue for this?
OS/Web Information
code-server --version
: code-server: v4.16.1 Code: 1.80.2 Commit: 2ccd690cbff1569e4a83d7c43d45101f817401dc Date: 2023-07-31T17:15:21.760Z (1 mo ago) Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2023.4 (io.robbie.HomeAssistant; build:2023.460; macOS 13.4.0) Mobile/HomeAssistant, like SafariSteps to Reproduce
Expected
The text that was cut in step 4 should have been pasted
Actual
Nothing happens and the right click menu does not show a paste option
Logs
Not available from within Home Assistant from what I can tell
Screenshot/Video
Does this issue happen in VS Code or GitHub Codespaces?
Are you accessing code-server over HTTPS?
Notes
This is the port that is used with in Home Assistant maybe due to updated HA Code version that was installed as I was thinking this was working before.