為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Cannot Copy a file in VSCode (in Home Assistant) open in Firefox

  • 6 回覆
  • 0 有這個問題
  • 2 次檢視
  • 最近回覆由 IanBJones

more options

On Firefox browser, I cannot Copy a file in Studio Code Server (within Home Assistant). SCS is open in HA in a Firefox tab. I get the error popup "Unable to read from the browser's clipboard. Please make sure you have granted access for this website to read from the clipboard." "Learn More" links to https://code.visualstudio.com/docs/remote/codespaces#_how-do-i-allow-vs-code-to-access-my-clipboard-for-reading and the "How do I allow VS Code to access my clipboard for reading?" section. But I cannot find similar settings in Firefox's Settings menu.

Any suggestions please on how to resolve this? I'm sure I used ~ a year back to be able to Copy a file ok in VSCode on Firefox. Thank you.

On Firefox browser, I cannot Copy a file in Studio Code Server (within Home Assistant). SCS is open in HA in a Firefox tab. I get the error popup "Unable to read from the browser's clipboard. Please make sure you have granted access for this website to read from the clipboard." "Learn More" links to https://code.visualstudio.com/docs/remote/codespaces#_how-do-i-allow-vs-code-to-access-my-clipboard-for-reading and the "How do I allow VS Code to access my clipboard for reading?" section. But I cannot find similar settings in Firefox's Settings menu. Any suggestions please on how to resolve this? I'm sure I used ~ a year back to be able to Copy a file ok in VSCode on Firefox. Thank you.

被選擇的解決方法

Firefox 127 added support for the clipboard.read() method used in other browsers; I think this was previously restricted to add-ons.

As an example of how it should work: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read#result_2

Firefox 127+ does not present a permission prompt, but there needs to be a direct connection between the user action triggering the clipboard read and the read itself; if there are hoops in between, permission maybe silently denied. https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API#security_considerations

Since browsers work differently, it's possible that websites which previously had special handling for Firefox will need to update to specially handle this change. However, I'm just guessing.

I don't know if there is a preference to roll back the Firefox 127 change.

從原來的回覆中察看解決方案 👍 1

所有回覆 (6)

more options

You should contact their support on how to use their software or how to integrate with Firefox browser since that isn't a Mozilla product.

有幫助嗎?

more options

Hi @markwarner22 The problem is on the Firefox Settings side. As I explained, and provided a link to, VSCS have provided a good indication of what the issue is and (on other browsers) how to solve it. My question was/is how to achieve that on Firefox...

有幫助嗎?

more options

選擇的解決方法

Firefox 127 added support for the clipboard.read() method used in other browsers; I think this was previously restricted to add-ons.

As an example of how it should work: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read#result_2

Firefox 127+ does not present a permission prompt, but there needs to be a direct connection between the user action triggering the clipboard read and the read itself; if there are hoops in between, permission maybe silently denied. https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API#security_considerations

Since browsers work differently, it's possible that websites which previously had special handling for Firefox will need to update to specially handle this change. However, I'm just guessing.

I don't know if there is a preference to roll back the Firefox 127 change.

有幫助嗎?

more options

Hi @jscher2000 , and thank you for your helpful response. However, I'm not sure exactly what you're advising me that I need to do? When I try your "Clipboard_API#security_considerations " test in Firefox (133.0.3 64bit), it responds "Error: Clipboard read operation is not allowed.". Since, I've also found I get the same "cannot copy from clipboard" error in VSC when in MS Edge browser. So, are you saying... a) The problem is on the Firefox side, and there's nothing I can do? b) The problem is on the VSC server side, and I need them to fix it? c) The problem is in Home Assistant, and I need them to update their VSC version or maybe change it's config in HA so it works on Firefox (and Edge)?

Best regards, Ian

有幫助嗎?

more options

IanBJones said

When I try your "Clipboard_API#security_considerations " test in Firefox (133.0.3 64bit), it responds "Error: Clipboard read operation is not allowed.".

Thank you for testing that. When I test in a cleaner (less customized) profile, I noticed there is a Paste button when the copied material originated outside the little test frame (screenshot attached):

If I don't use that Paste button, then I get the error you mentioned. Not sure whether you see that button anywhere on the VS Code site.

有幫助嗎?

more options

Hi @jsher2000, Again, my thanks. When I try your "Clipboard_API#security_considerations " test in HA's Visual Code Server page, I just get the error popup - no Button that I can see anywhere, either in Firefox or Edge browser. Both browsers get the error popup. So, I'm guessing this is one for the HA team to look at...

Many thanks for your help.

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題