Document: dragenter event

The dragenter event is fired when a dragged element or text selection enters a valid drop target.

The target object is the immediate user selection (the element directly indicated by the user as the drop target), or the <body> element.

Bubbles Yes
Cancelable Yes
Default action Reject immediate user selection as potential target element.
Interface DragEvent
Event handler property ondragenter


See the drag event for example code or this JSFiddle demo.


Specification Status Comment
HTML Living Standard
The definition of 'dragenter' in that specification.
Living Standard

Browser compatibility

ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
dragenter eventChrome Full support 4Edge Full support 12Firefox Full support 3.5
Full support 3.5
Notes In Firefox, the dragenter event is fired twice when the dropzone is parent of draggable or draggable itself. See bug 804036 for details.
IE Full support 10Opera Full support 12Safari Full support 3.1WebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS Full support 11Samsung Internet Android No support No


Full support
Full support
No support
No support
See implementation notes.
See implementation notes.

See also