You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ui): drag and drop not working for sortable hasMany fields (#15845)
### What
Fixes drag-and-drop sorting for relationship and select fields with
`hasMany` and `admin.isSortable: true`.
### Why
In v3.78.0, commit 418bb92 replaced `PointerSensor` with
`MouseSensor` + `TouchSensor`. The `MultiValue` component was overriding
the `onMouseDown` handler from `listeners`, preventing the `MouseSensor`
from detecting drag start events.
### How
Extract `onMouseDown` from `listeners` and call it explicitly before the
custom `stopPropagation` logic. Touch and keyboard handlers remain
unaffected.
Fixes#15843
// Call the MouseSensor's handler first to enable mouse dragging
61
+
if(isSortable&&listenersMouseDown){
62
+
listenersMouseDown(e)
63
+
}
64
+
57
65
if(!disableMouseDown){
58
66
// we need to prevent the dropdown from opening when clicking on the drag handle, but not when a modal is open (i.e. the 'Relationship' field component)
0 commit comments