fix: enable drag and drop reordering in Edra editor

Add return false to drop handler so ProseMirror's Dropcursor extension can handle the actual node movement. Previously the handler would intercept drops but not perform any movement.
This commit is contained in:
Justin Edmund 2025-11-03 23:03:07 -08:00
parent 78ef0c3d18
commit 1190bfc62e

View file

@ -387,6 +387,10 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey:
const slice = new Slice(Fragment.from(newList), 0, 0) const slice = new Slice(Fragment.from(newList), 0, 0)
view.dragging = { slice, move: event.ctrlKey } view.dragging = { slice, move: event.ctrlKey }
} }
// Return false to let ProseMirror's default drop handler (from Dropcursor) take over
// This allows the actual node movement to happen
return false
}, },
dragend: (view) => { dragend: (view) => {
view.dom.classList.remove('dragging') view.dom.classList.remove('dragging')