- From: Sebastian Markbåge <sebastian@calyptus.eu>
- Date: Mon, 27 Jul 2009 13:03:05 +0200
- To: Jacob Rossi <t-jacobr@microsoft.com>
- Cc: "www-dom@w3.org" <www-dom@w3.org>, "public-webapps@w3.org" <public-webapps@w3.org>, Travis Leithead <travil@microsoft.com>, Tony Ross <tross@microsoft.com>
- Message-ID: <491930550907270403j36ff3480x73a73c439d31414f@mail.gmail.com>
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 similar. 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. Regards, Sebastian Markbåge On Mon, Jul 27, 2009 at 6:39 AM, Jacob Rossi <t-jacobr@microsoft.com> wrote: > Section 7.10.6 "Copy and paste"<http://dev.w3.org/html5/spec/Overview.html#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