voloko/uki — Issue #38: Native Drag & Drop with Chrome
Author: jackyyll
Created: 2011-10-21 21:29:47+00:00
State: open

When uki tests if the browser supports native drag & drop it doesn't properly disable for Chrome.

```
// detect if native DnD is supported
try {
if (
// typeof doc.createElement('div').ondragstart == 'object' || // ie support
typeof doc.createEvent('MouseEvent').dataTransfer == 'object' || // safari
doc.createEvent('DragEvent').initDragEvent // w3c support
) {
// Google Chrome has to many issues with native d&d. It is simpler to disable than to fix
dnd.nativeDnD = !ua.match(/Chrome\/4/);
}
} catch (e) {}
```

Should be:

```
// detect if native DnD is supported
try {
if (
// typeof doc.createElement('div').ondragstart == 'object' || // ie support
typeof doc.createEvent('MouseEvent').dataTransfer == 'object' || // safari
doc.createEvent('DragEvent').initDragEvent // w3c support
) {
// Google Chrome has to many issues with native d&d. It is simpler to disable than to fix
dnd.nativeDnD = !ua.match(/Chrome/);
}
} catch (e) {}
```