xpra icon
Bug tracker and wiki

Changes between Initial Version and Version 4 of Ticket #1844


Ignore:
Timestamp:
06/03/19 11:50:06 (8 months ago)
Author:
Antoine Martin
Comment:

Updates:

  • r22834 new async api calls
  • r22837 answer clipboard requests
  • r22838 workaround PRIMARY + CLIPBOARD overwriting values
  • r22839 don't bother synchronizing PRIMARY if we have the new async API
  • r22840 stricter test for navigator.clipboard API availability

Important: just found information on clipboardchange event in w3c: Async Clipboard API. This is not supported in any browser yet. This means we would not necessarily have to claim the clipboard every time we get a token, we could rely on those events to notify the server. For chrome: onClipboardDataChanged.

Maybe we should query the Permissions API rather than just checking if the method exists? See Asynchronous Clipboard API Sample

Tested:

  • Chrome 75.0.3770.51 (Official Build) beta (64-bit) Linux: OK (connecting to localhost using websocket)
  • Chrome 74 MS Windows: OK via https, otherwise legacy mode
  • Firefox 67 Linux: legacy mode
  • Firefox 67 MS Windows: legacy mode

The Firefox results are surprising since they claim to support the async API since V63, but this matches the results from this test. The spec says: Firefox only supports reading the clipboard in browser extensions, using the "clipboardRead" extension permission.

Then there are also issues with "secure contexts": works for localhost, otherwise https is required, etc..

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1844

    • Property Status changed from new to assigned
    • Property Priority changed from major to critical
  • Ticket #1844 – Description

    initial v4  
    11See [https://developers.google.com/web/updates/2018/03/clipboardapi Unblocking Clipboard Access]: ''It's a replacement for execCommand-based copy & paste that has a well-defined permissions model and doesn't block the page.''
    22
     3MDN: [https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard Navigator clipboard].
     4
    35Original html5 clipboard tickets: #842, #1461