Document: dragleave event
The dragleave
event is fired when a dragged element or text selection leaves a valid drop target.
Bubbles | Yes |
---|---|
Cancelable | No |
Default action | None. |
Interface | DragEvent |
Event handler property | ondragleave |
Examples
See the drag event for example code or this JSFiddle demo.
Specifications
Specification |
---|
HTML Standard (HTML) # event-dnd-dragleave |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
dragleave_event |
4 |
12 |
3.5 |
10 |
12 |
3.1 |
No |
No |
No |
No |
11 |
No |
See also
- Other drag and drop events:
- This event on other targets:
-
Window
:dragleave
event -
HTMLElement
:dragleave
event -
SVGElement
:dragleave
event
-
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/dragleave_event