Description
Description
This is the follow-up issue for the PR #5994.
There're two problems with the BrowserClipboardService
impl which relies on Async Clipboard API
for accessing the system clipboard:
1/ It works only for localhost and for the pages, loaded over https. But for non-secure http pages, it's prohibited due to the security concerns.
2/ It works well in Chrome but it requires performing additional steps in FireFox to unlock Async Clipboard API
. One needs to enable API through the dom.events.testing.asyncClipboard
preference. See the PR #5994 description for the details.
It looks like BrowserClipboardService
needs to use both Async Clipboard API
and document.execCommand API
to work properly for the different cases.
Note, FF requires calling document.execCommand('cut'/'copy')
inside the short-living event handlers of user actions like mouse click, keypress etc. See #5994 (comment) for the details. So it won't work when a plugin calls it through env.clipboard
plugin API.
Also:
TerminalCopyOnSelectionHander has to be replaced with ClipboardService and copy on select for terminals has to be tested as a part of this issue
see #6536 (comment)