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
I need to prevent dragging based on the DOM element (tree) which the user started dragging.
The new RadixUI dropdown menu is being rendered inside the item (as opposed to a React Portal) which means that if you open a dropdown menu inside a draggable item it will allow to drag the whole dropdown menu. EDIT: it actually still applies even if the dropdown is portaled, because the event up the component tree.
I can hack it with the disabled flag but it's a lot of unnecessary work.
I'd be great if dnd-kit's onDragStart event contained the event.target and be preventable (.preventDefault()), or have some other mechanism to prevent the dragging.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to prevent dragging based on the DOM element (tree) which the user started dragging.
The new RadixUI dropdown menu is being rendered inside the item (as opposed to a React Portal) which means that if you open a dropdown menu inside a draggable item it will allow to drag the whole dropdown menu. EDIT: it actually still applies even if the dropdown is portaled, because the event up the component tree.
I can hack it with the
disabledflag but it's a lot of unnecessary work.I'd be great if dnd-kit's
onDragStartevent contained theevent.targetand be preventable (.preventDefault()), or have some other mechanism to prevent the dragging.Beta Was this translation helpful? Give feedback.
All reactions