Add Drag In and Drag Out events by roy-mdr · Pull Request #2198 · SortableJS/Sortable
added 2 commits
September 2, 2022 14:09Leaved comments in this commit for code review before merge. known isues: - DnD HTML5 API: If drag too fast to another browser UI element (ej. dev tools) the HTML5 DnD dragLeave event is not triggered (not an issue from this code) ... a workaround could be to force a fallback to get the element at pointer position when dragging back to the browser window.
Before: dragIn event was only triggered when it was a valid list to drop in. However if the list was nested in another Sortable the event didn't fire again because it was already marked as valid. After: dragIn event is triggered even if is not a valid Sortable to drop in. Now is up to the Sortable component to handle and check if the list is allowed to drop in.
onDrop event is triggered when a sortable-dragging element is dropped inside the X and Y of the Sortable element, even if there was no onEnd event triggered
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters