为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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.

有帮助吗?

我要提问

您需要登录才能回复。如果您还没账号,可以提出新问题