Re: [w3c/clipboard-apis] What happens if promises to Blobs are not resolved within a reasonable amount of time? (Issue #161)

> @mbrodesser Yep, that would definitely be an issue.

Thanks, thought about the issue again and agree.

> I think we could relax the user gesture requirement to only have transient user activation during read/write call (along with permissions for the read call, if the browser has implemented clipboard permissions). That way authors have some time to at least initiate the read/write call, but resolving the promises to Blobs doesn't need to have this restriction, nor does writing to the system clipboard. Thoughts?

@snianu: this could be confusing to users, e.g. when they switch tabs. Or when malicious websites postpone resolving those promises for a long time, e.g. minutes.

I wonder if this only affects `write()` and `writeText()`, but neither `read()` nor `readText()`. If not, that may simplify thinking about this.

It seems worth considering the end user perspective on this, on Safari (for Gecko/Firefox we'll likely implement the same). What is the UX there, currently? Is a "Copy" button shown? I'm only aware of the `read*()` case, which shows a "Paste" button. CC @rniwa 

I think end users need to be informed visually when a `write*()` call starts, as long as it hasn't finished and when it's indeed finished. Browsers (Safari and Firefox, at least) should ensure this; it shouldn't be up to the discretion of web-devs to ensure this. If we can agree on this, that may also help to specify tab switching cases properly. My gut feeling is that writing large amounts of data to the clipboard happens rarely, and it may be acceptable for end users to not switch tabs, as long as the write-process is ongoing. It seems worth keeping this as simple as possible. Those are just thoughts, my mental model of this is still growing.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/161#issuecomment-963148234

Received on Monday, 8 November 2021 13:25:52 UTC