W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: clipboard events

From: Paul Libbrecht <paul@hoplahup.net>
Date: Tue, 10 May 2011 08:31:34 +0200
Cc: public-webapps@w3.org
Message-Id: <357D0132-84BF-4C02-BBE7-3F32470B485D@hoplahup.net>
To: Joćo Eiras <joao.eiras@gmail.com>

Le 10 mai 2011 ą 00:18, Joćo Eiras a écrit :

>> I would just model the 'copy' (and 'cut') events exactly as a 'dragstart'
>> event, ideally so much so that you can literally use the same function for
>> both. (Canceling 'cut' would prevent the default deletion of the
>> selection, canceling 'copy' has no effect.)
> 
> Shouldn't canceling 'copy' prevent the data from being placed in the clipboard ?

I am not sure of the above. I feel it should either be:
A- this (stop the copy, triggering an error)
B- or remove all of the script's modifications of the clipboard data and leaves it to the "native copy" 

The advantage with B is that it prevents scripts that would try to prevent a copy which is important I feel.

> That way a script can instead explicitly set the contents of the clipboard, if some sanitization needs to be done.

I do not think this should be possible since writing to clipboard should only be doable with a copy event triggered by the environment (typically at the invocation of the standard gesture).

paul
Received on Tuesday, 10 May 2011 06:32:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT