eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.04k stars 2.5k forks source link

Paste command not supported on Chrome browsers #10642

Open msujew opened 2 years ago

msujew commented 2 years ago

Bug Description:

This was originally mentioned in https://github.com/eclipse-theia/theia/discussions/10640

When selecting the Paste context menu entry on an editor with Chrome, a notification appears warning the user that the operation is unsupported. This is due to an old bug in the Chromium browser project:

https://github.com/eclipse-theia/theia/blob/0387822ed12e21fcb935c7af2c05ed294b782218/packages/core/src/browser/common-frontend-contribution.ts#L312-L315

However, the original bug was seemingly fixed back in 2017, so we can safely assume that no users should be impacted by this, removing the need for checking for isChrome.

Additional Information

ouroboran commented 2 years ago

Hi @msujew, I think it is not Chrome bug anymore. document.queryCommandSupported('paste') will return false in all modern browsers. So paste command is not working in any browser.

https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandSupported#notes

Please correct me if I'm wrong.

msujew commented 2 years ago

@ouroboran Thanks for the info. It also does not seem to workon FireFox. I assume that most browsers stopped supporting the API at all.

vince-fugnitto commented 2 years ago

The following issue may be related: https://github.com/eclipse-theia/theia/issues/6209.