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