onmoveend event | moveend event
Occurs when the user stops dragging an absolute or relative positioned element in an editable region.
An editable region can be specified with the contentEditable and designMode properties.
Positioned elements are not movable by default in editable regions; use the 2D-Position command to enable it.
If you would like to receive a notification when the user stops resizing an element, use the onresizeend event.How to register:
In HTML:
In JavaScript:
<ELEMENT onmoveend="handler"> |
In JavaScript:
object.onmoveend = handler; | ||||||
object.attachEvent ("onmoveend", handler); |
You can find the related objects in the Supported by objects section below.
The event object is accessible to all event handlers in all browsers.
The properties of the event object contain additional information about the current event.
To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
For a complete list of events, see the page for Events in JavaScript. |
Basic information:
Bubbles | Yes |
Cancelable | No |
Event object | - |
Actions that invoke the onmoveend event:
- Finishing dragging a relative or absolute positioned element in an editable region.
The order of events related to the onmoveend event:
- onmovestart
- onmove
- onmoveend
Example HTML code 1:
This example dumps the order of events while the user is dragging an absolute positioned element:
|
||||
<head> <script type="text/javascript"> // the '2D-position' command throws an exception in Firefox try { // enables moving absolute and relative positioned elements by dragging document.execCommand ("2D-position", false, true); } catch (e) {}; function DumpInfo () { var info = document.getElementById ("info"); info.innerHTML += event.type + ", "; } </script> </head> <body> Drag the blue element with your mouse! <div contenteditable="true" style="border:1px solid #000000; height:200px;"> <div style="width:200px;height:80px; background-color:blue; position:absolute;" onmovestart="DumpInfo ()" onmove="DumpInfo ()" onmoveend="DumpInfo ()"> </div> </div> <br /><br /> <div id="info" style="background-color:#f0f0ff; font-weight:bold;"></div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
a, abbr, acronym, address, applet, area, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, frame, frameset, h1, h2, h3, h4, h5, h6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, listing, marquee, menu, nobr, noframes, object, ol, p, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
Related pages:
External links:
User Contributed Comments