[whatwg] DND: compatibility notes

Daniel Cheng dcheng at chromium.org
Thu Feb 23 12:17:52 PST 2012


On Fri, Feb 17, 2012 at 01:37, Anne van Kesteren <annevk at opera.com> wrote:

> =Dragging files into the browser=
> * In Opera and FF, you have to preventDefault on the drop event, or the
> browser will correctly open the file *after* handing it to the page. In
> Chrome, simply having a drop listener is enough to prevent it opening the
> file, which is not spec-compliant.
>

I filed a bug for this behavior in WebKit, and one of the responses was the
following:

> Drop a URL on IE6/7/8, the browser navs. Drop a URL in IE6/7/8 on a <div>
> that cancels the default action of dragenter/dragover, the browser _does
> not_ nav. Same results for a File. The spec is based on IE6; Opera and
> Firefox are out of spec.


My personal opinion is that you should have to cancel the drop event to
prevent the drop's default action, but apparently the IE model does not
agree (I didn't test this personally though). Is the divergence between IE
and the spec intentional?

Daniel



More information about the whatwg mailing list