JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.65k stars 4.13k forks source link

defaultPrevented issue with react-beautiful-dnd #5176

Open loun4 opened 2 years ago

loun4 commented 2 years ago

Since the following change 150c02028aa8e47f4071357e44f4c0daeda44a18 React Select can no longer be opened through onControlMouseDown and the event.defaultPrevented is always true when the component is rendered inside react-beautiful-dnd.

CSB: https://codesandbox.io/s/vertical-list-forked-mucu2g?file=/index.js

@rkulinski can you consider using internal flag instead of defaultPrevented (53cc8ce7f87ed660276361b6d89e8fb175c19ac6) to ensure that the event is captured by dropdown indicator ?

rkulinski commented 2 years ago

Hey. That was my initial proposal - usage of internal flag. See this conversation https://github.com/JedWatson/react-select/pull/5089

Possibly this case would require some other kind of patch.

tlenclos commented 2 years ago

Can reproduce also after upgrading to 5.3.

loun4 commented 2 years ago

@Rall3n @rkulinski Is there a plan to remove the defaultPrevented or provide a way to override the default behavior ?

kamen-kirilov commented 1 year ago

Is there any solution to that one? Still issue with v5.6.0

sreahard commented 1 year ago

It would be great if there was a fix for this, I did work up a fiddle to get this working with react-beautiful-dnd, not ideal, but workable if any one else is running into this. https://codesandbox.io/s/vertical-list-forked-tqwc9v?file=/index.js

josephnle commented 1 year ago

I found another workaround in react-beautiful-dnd. It's still ugly but I'm not yet sure what react-select can do to accommodate the case when a library like react-beautiful-dnd binds to global mousedown.

https://github.com/atlassian/react-beautiful-dnd/issues/1810#issuecomment-1077952496

ranafaraznaru commented 1 year ago

Can someone tell me why we can't select text by double click if text is inside draggable div?

hoangmf commented 1 year ago

Hi everyone, It still seems like a problem. I'm faced with it.

mmswi commented 3 weeks ago

hello. updated now from 2 to 5. found this error when using react-select under a react-beautiful-dnd