[whatwg] Drag-and-drop feedback

Quick correction/addendum: FireFox seems to be actually fine with CRLF as
line separator in setData("text/uri-list", data) and will return only the
first URL within data on getData("URL"). However, it doesn't seem to return
files as URLs with getData("text/uri-list"), which I guess would be my third
question:

.) should dragged files be converted to file URLs and returned in a call to
getData("text/uri-list") or getData("URL")?


- Roland

On Fri, Feb 5, 2010 at 4:34 PM, Roland Steiner <rolandsteiner at google.com>wrote:

>
> Since I am currently in the process of fixing bugs in this area for Chrome,
> there are 2 things I'm wondering about:
>
> .) whether "Text" and "URL" should be part of the return value of "types"
> (probably not, according to Ian's comment). However, since "text/uri-list"
> may in fact not contain a valid URL, the presence/absence of "URL" in types
> could be useful. I.e., it could indicate whether getData("URL") will return
> something useful.
>
> .) Judging from the example in
> https://developer.mozilla.org/En/DragDrop/Drag_Operations#drop , Firefox
> seems to use only LF for line feeds within text/uri-list, while RFC 2483
> calls for CR-LF for all "text/*" formats, including "text/uri-list", as does
> the HTML5 spec in the section on the drag-and-drop processing model.
> Since the UA has to parse "text/uri-list" for the return value of "URL", I
> wonder whether both should be accepted (break on LF, filter out any CR). The
> other problem here is that WebKit/Safari and Chromium convert files to file
> URLs to return for "text/uri-list"/"URL". Is there a consensus how this
> difference should be best handled (or is this just a bug in FF)?
>
>
> Cheers,
>
> Roland
>
>
> On Thu, Feb 4, 2010 at 11:29 AM, Ian Hickson <ian at hixie.ch> wrote:
>
>> Webkit and Firefox are case-sensitive. IE only does "TEXT" and "URL", but
>> case-insensitively (at least for Text, I didn't test URL). Chrome is
>> case-insensitive for everything.
>>
>> Tough call. I guess we'll go with just converting everything to lowercase,
>> so that it's case-insensitive.
>>
>> BTW I noticed Chrome includes "Text" and "URL" in the .types list. That's
>> incorrect according to the spec.
>>
>> --
>> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
>> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
>> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100205/60792764/attachment.htm>

Received on Friday, 5 February 2010 00:13:13 UTC