W3C home > Mailing lists > Public > public-html@w3.org > October 2010

Re: [Bug 10712] Drag and Drop: Add an attribute to identify drop targets

From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
Date: Sat, 30 Oct 2010 13:27:24 -0700
Message-ID: <bay141-DS8C24CCC00C8116AE7261DF8460@phx.gbl>
To: "Maciej Stachowiak" <mjs@apple.com>, "Laura Carlson" <laura.lee.carlson@gmail.com>
Cc: "Sam Ruby" <rubys@intertwingly.net>, "Paul Cotton" <Paul.Cotton@microsoft.com>, "HTML WG" <public-html@w3.org>, "HTML Accessibility Task Force" <public-html-a11y@w3.org>, <www-style@w3.org>

From: "Maciej Stachowiak" <mjs@apple.com>
Sent: Friday, October 29, 2010 5:07 PM
To: "Laura Carlson" <laura.lee.carlson@gmail.com>
Cc: "Sam Ruby" <rubys@intertwingly.net>; "Paul Cotton" 
<Paul.Cotton@microsoft.com>; "HTML WG" <public-html@w3.org>; "HTML 
Accessibility Task Force" <public-html-a11y@w3.org>
Subject: Re: [Bug 10712] Drag and Drop: Add an attribute to identify drop 

> We welcome discussion of DnD design on this mailing list or in the bug, if 
> anyone has input.
> Regards,
> Maciej
> On Oct 29, 2010, at 4:50 PM, Laura Carlson wrote:
>> Hi Sam, Maciej, and Maciej,
>> Shelley has ask that the following to be brought to your attention.
>> On 10/29/10, bugzilla@jessica.w3.org <bugzilla@jessica.w3.org> wrote:
>>> http://www.w3.org/Bugs/Public/show_bug.cgi?id=10712

I don't think that D&D is solely HTML thing. I've found it to be closer to 
CSS than to HTML per se.

Here is what I am using in CSS to give it D&D support:

D&D Properties:

  accept-drop : selector( ...from...)
       - defined on a container - selector(css selector) function defines 
source elements allowed to be dropped here.

  drop: insert | append | prepend
       - defined on a container - defines position where dropped element is 

  draggable: none | both | move | copy
       - defined on "draggable" elements to allow them to be dragged.

D&D State flags (pseudo-classes):

       - is "on" when drag in in effect and the element has accept-drop that 
matches dragged element.

       - is "on" for :drop-target element when draggable has arrived to it.

       - is "on" for the element that requested drag.

  :moving and :copying
       - either one of these is "on" for the element being dragged.

       - is "on" for the placeholder element that represents the place
         where dragged item will land.

When D&D operation starts internal handler sets :drop-target
flags to all elements with satisfying  accept-drop:selector( ... ) 
So CSS is able to highlight them.
:drop-target and :drag-over flags are also set in case of e.g. text drag
from other applications to UA window for elements that can accept
drop of text (<input> <textarea>, etc. ).

I suspect that these are constitute minimal set of things that need to
be added. At least it supports basic "shopping bag" and "tab reordering"

If needed I can provide a demo to play with.

Andrew Fedoniouk

Received on Saturday, 30 October 2010 20:28:12 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:06 UTC