Re: Copy/Paste Events

I agree with Jacob. I find this part of the spec... puzzling.
Since there is currently no way to differentiate between a copy and a
dragstart, you could potentially cause unnecessary UI flicker if you
added/changed elements during dragstart and removed them during dragend to
make a visual indication that a drag was being performed.

It seems that nobody has bothered to implement this part of the spec even
when implementing Drag & Drop so it must not make sense. The pragmatic
approach would be to use something like that in IE or WebKit which are very

The difference being that, unlike IE, the WebKit model doesn't allow content
to be arbitrarily added to the clipboard outside of the dedicated events -
which I think is a good thing.


Sebastian Markbåge

On Mon, Jul 27, 2009 at 6:39 AM, Jacob Rossi <> wrote:

>  Section 7.10.6 "Copy and paste"<>of the HTML5spec suggests that "copy-and-paste is a form of drag-and-drop." It mandates
> that for a copy operation the user agent should act as if the user had
> initiated a drag on the current selection. Likewise, a cut should be a
> "drag" operation followed by a selection delete operation. Accordingly, a
> paste should be treated as a drop.
> I would assume this concept should be applied to the events associated with
> these actions as well. Thus it would follow that a copy/cut operation would
> produce a drag event and a paste would produce a drop.
> Is this really what we want? Most implementations (IE, Firefox, Safari, and
> Chrome) already have separate events for copy/cut/paste. While I see the
> similarities between the copy-and-paste and drag-and-drop, I don't believe
> that means they should be lumped together.  For example, what if a web page
> wishes to change the mouse cursor while a drag operation is occurring? You
> wouldn't want the mouse cursor to change in the same manner when text is
> copied to the clipboard.
> In general, unless there is a significant savings in combining these two
> operations into one set of events, I think that they are best
> differentiated.
> Thoughts?
> Regards,
> Jacob Rossi

Received on Monday, 27 July 2009 11:03:50 UTC