Find
C
ase-sensitive
R
egexp search
Path
mozilla-central
/
toolkit
/
content
/
widgets
/
moz-reorderable-list
Navigation
Enable keyboard shortcuts
Name
Description
Size
moz-reorderable-list.css
442
moz-reorderable-list.mjs
A wrapper element that allows its children to be reordered by dragging and dropping. The element emits the custom `reorder` event when an item is dropped in a new position, which you can use to perform the actual reordering. The detail object of the `reorder` event contains the following properties: - `draggedElement`: The element that was dragged. - `targetElement`: The element over which the dragged element was dropped. - `position`: The position of the drop relative to the target element. -1 means before, 0 means after. Which children are reorderable is determined by the `itemSelector` property. Things to keep in mind when using this element: - Preserve the focus when reordering items. - Check that the reordering shortcuts are not in conflict with other shortcuts. - Make sure that reordering is picked up by screen readers. Usually DOM updates cause the reordered element to be read out again, which is sufficient. @tagname moz-reorderable-list @property {string} itemSelector - Selector for elements that should be reorderable. @fires reorder - Fired when an item is dropped in a new position. @fires dragstarted - Fired when an item is dragged. @fires dragended - Fired when an item is dropped.
11985
moz-reorderable-list.stories.mjs
3450