The HTML Drag and Drop API works in Chrome 4+, Edge 18+, Firefox 3.5+, Safari 3.1+, and Safari iOS 15+. Learn the events, browser support, and known issues.

Prince Dewani
May 1, 2025
On This Page
The HTML Drag and Drop API is a WHATWG specification that lets web pages drag elements, text, and files within a page or from the operating system. It works in Chrome 4+, Edge 18+, Firefox 3.5+, Safari 3.1+ on macOS, Safari 15+ on iOS, Opera 12+, and Samsung Internet 14+, while Internet Explorer never shipped full support.
This guide covers what the API is, the browsers that support it, the drag events, how to feature-detect it, and the known issues.
The HTML Drag and Drop API is a WHATWG specification that lets web pages drag and drop elements, selections, text, and files. The HTML Living Standard at WHATWG defines the DragEvent interface, the DataTransfer object, and the draggable attribute that turn any DOM node into a drag source or a drop target.
Every modern desktop browser supports the HTML Drag and Drop API for mouse and trackpad input, with global usage above 94%. Mobile finger-drag support is the gap to plan around.
Chrome supports the HTML Drag and Drop API from Chrome 4 on Windows, macOS, Linux, and ChromeOS. All seven DragEvent handlers, dataTransfer.setData, dataTransfer.files, and HTMLImageElement-based setDragImage have worked since Chrome 4. Chrome 21+ also accepts folder drops via dataTransfer.items.webkitGetAsEntry.
Microsoft Edge supports the HTML Drag and Drop API from Edge 18 on Windows. Pre-Chromium EdgeHTML 12 to 17 had partial support that missed parts of dataTransfer.items and the file-drop pipeline. Chromium-based Edge 79+ on Windows, macOS, Linux, and Android tracks Chrome and ships full support.
Firefox supports the HTML Drag and Drop API from Firefox 3.5 on Windows, macOS, and Linux. Firefox accepts any DOM node as the second argument to dataTransfer.setDragImage, including off-screen elements. Firefox for Android does not fire DragEvent from a finger touch.
Safari on macOS supports the HTML Drag and Drop API from Safari 3.1. Every later macOS Safari ships the same DragEvent surface, dataTransfer access, and File-object drops. Safari requires an HTMLImageElement or a DOM-attached node inside the viewport for setDragImage, otherwise the drag thumbnail falls back to the source element.
Safari on iOS and iPadOS supports the HTML Drag and Drop API from iOS 15 and iPadOS 15. Apple wired DragEvent into WebKit alongside iPadOS pointer support, so iPad and iPhone Safari fire dragstart, dragover, and drop from a Bluetooth mouse, an external trackpad, or an Apple Pencil. iOS 3.2 to 14.x had no DragEvent, and Chrome, Edge, and Firefox on iOS inherit the same gap because every iOS browser uses WebKit.
Opera supports the HTML Drag and Drop API from Opera 12 on Windows, macOS, and Linux. Opera Mobile 12.1+ supports it on Android, tracking the underlying Chromium engine since the Blink switchover. Opera 9 to 11.6 and Opera Mini do not fire DragEvent; load a polyfill like mobile-drag-drop for those visitors.
Samsung Internet exposes the DragEvent JavaScript surface on every Galaxy phone running its Chromium pipeline, but typical finger-touch sessions do not fire drag events. A Bluetooth mouse, a DeX-mode pointer, or an S Pen on a Galaxy Tab can drive drag and drop. Pair the API with a Pointer Events fallback for finger input.
The legacy stock Android Browser, last shipped with Android 4.4 KitKat, never supported the HTML Drag and Drop API in full. Chrome for Android, Samsung Internet, and Firefox for Android replaced it on every Android 5.0+ device. Mouse or trackpad input on a ChromeOS or DeX device is the only path to fire DragEvent on Android.
Internet Explorer 5.5 to 11 expose a pre-HTML5 drag-and-drop surface that misses dataTransfer.items, file drops, and the modern DataTransferItemList. Microsoft has retired Internet Explorer 11 from support, so move drag-and-drop-dependent web apps to Chromium-based Edge or Chrome for full DragEvent coverage.
Note: HTML Drag and Drop API behavior shifts across Safari, mobile Chrome, and Samsung Internet. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
The HTML Drag and Drop API defines seven DragEvent types that fire on the source element and the drop target as the user drags, hovers, and releases. Wire only the events your app actually needs.
Test for the draggable attribute on a sample element and the DragEvent constructor on window. Both checks are stable across Chrome, Edge, Firefox, Safari, Opera, and Samsung Internet, so a single in check separates supported browsers from legacy IE and the old Android Browser.
// Paste this into the DevTools console of any browser to confirm
// HTML Drag and Drop API support before wiring drag handlers.
const probe = document.createElement("div");
const supportsDragAndDrop =
"draggable" in probe &&
"ondragstart" in probe &&
"ondrop" in probe &&
typeof DragEvent === "function" &&
typeof DataTransfer === "function";
if (supportsDragAndDrop) {
console.log("HTML Drag and Drop API is supported in this browser.");
} else {
console.log("HTML Drag and Drop API is missing. Use a Pointer Events fallback.");
}
// Touch input is a separate concern. Mobile Chrome, Firefox for Android,
// and Samsung Internet do not fire DragEvent from a finger.
if ("ontouchstart" in window) {
console.log("Touchscreen detected. Add a mobile-drag-drop polyfill for finger drags.");
}If the console prints "HTML Drag and Drop API is supported" but a finger drag still does nothing, the device is on Chrome for Android, Firefox for Android, or Samsung Internet. Use a Pointer Events polyfill like mobile-drag-drop for finger input on those browsers.
The HTML Drag and Drop API is broadly available on desktop, but mobile touch input, the unimplemented dropzone attribute, and quirks in dataTransfer.items and setDragImage still trip up production apps.
In my experience, the trap that bites every drag-and-drop integration once is the missing dragover preventDefault. The dragstart fires, the dragenter fires, but drop silently never fires because the target never marked itself as a drop zone. Always preventDefault inside dragover and the surprise goes away.
All HTML Drag and Drop API version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance