Document: dragend event
The dragend
event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key).
Bubbles | Yes |
---|---|
Cancelable | No |
Default action | Varies |
Interface | DragEvent |
Event handler property | ondragend |
Examples
See the drag event for example code or this JSFiddle demo.
Specifications
Specification |
---|
HTML Standard (HTML) # event-dnd-dragend |
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 | |
dragend_event |
4
Before Chrome 72, the
dragend event was not dispatched if an iframe (not necessarily the source target) is involved in a DOM operation. See issue 737691 for more details. |
12 |
3.5
["Firefox doesn't set the mouse coordinates during the drag event. See bug 505521.", "In Firefox,
dragend is not dispatched if the source node is moved or removed during the drag (e.g. on drop or dragover ). See bug 460801 for details."] |
10 |
12 |
3.1 |
No |
No |
No |
No |
11 |
No |
See also
- Other drag and drop events:
- This event on other targets:
-
Window
:dragend
event -
HTMLElement
:dragend
event -
SVGElement
:dragend
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/dragend_event