Respect put: false on the revert-to-origin path by nandastone · Pull Request #2465 · SortableJS/Sortable
When a dragged item has left its source sortable and the cursor hovers back over it, _onDragOver enters the "revert" branch (line 1152) to move dragEl back to its origin. This branch checks `canSort` but never checks `group.checkPut`, so `put: false` is silently ignored for the owner sortable. The non-owner branch (line 1154-1158) already gates on `checkPut`. This change makes the owner branch symmetric: revert only proceeds if `checkPut` also allows it. Lists that declare `put: false` will no longer have their own items forcibly reinserted during a cross-list drag. Backward compatibility: only affects sortables that explicitly set `put: false`. The default (`put: true` or unset) is unchanged, because `checkPut` returns true.
added a commit to nandastone/vue-draggable-plus that referenced this pull request
Apr 13, 2026Externalize sortablejs as a peer dependency instead of bundling it into the dist. Consumers share a single sortablejs instance, so plugin registration via Sortable.mount() works from consumer code. Add three SortableJS plugins (src/plugins.ts) mounted at module load: - CloneGhost: destination-specific drag preview on cross-list entry. - HideOnLeave: hides placeholder when cursor exits destination rect. - BodyClass: toggles body.sortable-dragging during any drag. Add draggedData reactive ref on UseDraggableReturn. Add cancellable onAdd (return false to skip auto-insert for cross-type drops). Dist is checked in so git-dep consumers get the built output. Upstream sortablejs bug: SortableJS/Sortable#2465.
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