Bug 204487
| Summary: | Safari Gives False Positives for draggable property | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | dhtmlkitchen <dhtmlkitchen> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | cdumez, graouts, thorton, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 12 | ||
| Hardware: | Unspecified | ||
| OS: | iOS 12 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=204271 | ||
dhtmlkitchen@gmail.com
Safari returns true for `draggable` DOM property.
```
isDraggableSupported = (()=> {
const div = document.createElement("div");
div.setAttribute("draggable", "true");
return div.draggable === true;
})();
```
Result: true.
Expected result: false
According to the HTML5 specification, "The draggable property returns true if the element is draggable; otherwise, it returns false." https://html.spec.whatwg.org/dev/dnd.html#the-draggable-attribute
In Safari iOS elements are not draggable, so the draggable property must always be false.
See also https://bugs.webkit.org/show_bug.cgi?id=204271
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/57436196>