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

Re: Clipboard API spec should specify beforecopy, beforecut, and beforepaste events

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Tue, 1 May 2012 15:38:06 -0700
Message-ID: <CABNRm61JCZjdxM0xJ1DpFnnxTTcnKhNS5WkViw+y_akc3X8j3w@mail.gmail.com>
To: Scott González <scott.gonzalez@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org
On Tue, May 1, 2012 at 3:07 PM, Scott González <scott.gonzalez@gmail.com>wrote:

> On Tue, May 1, 2012 at 5:08 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>
>> If we _do_ decide to specify them then their interaction with script
>> running inside the events that changes the focus needs to be very carefully
>> specified, since changing focus will change what cut/copy/paste behavior.
>>  I would also need to see some _really_ convincing use cases.
>>
>
> I recall moving focus for paste events in order to figure out what is
> being pasted. I believe this is common in WYSIWYG editors; a new element is
> created and focus is moved to that element, then the paste occurs, then the
> element is inspected for the content and the editor does whatever it needs
> to (like cleaning up junk from pasted Word documents). Obviously if there
> was a cleaner way to get the contents, like Microsoft APIs for accessing
> the clipboard, then this wouldn't be needed.
>

Does the dataTransfer interface available through via paste event address
your use cases?
http://dev.w3.org/2006/webapi/clipops/clipops.html#fire-a-clipboard-event
http://www.w3.org/TR/html5/dnd.html#the-datatransfer-interface?

- Ryosuke
Received on Tuesday, 1 May 2012 22:38:55 GMT

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