react-select icon indicating copy to clipboard operation
react-select copied to clipboard

defaultPrevented issue with react-beautiful-dnd

Open loun4 opened this issue 3 years ago • 10 comments

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 ?

loun4 avatar May 02 '22 14:05 loun4

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.

rkulinski avatar May 02 '22 15:05 rkulinski

Can reproduce also after upgrading to 5.3.

tlenclos avatar May 11 '22 09:05 tlenclos

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

loun4 avatar May 11 '22 09:05 loun4

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

kamen-kirilov avatar Feb 03 '23 15:02 kamen-kirilov

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

sreahard avatar Feb 03 '23 17:02 sreahard

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

josephnle avatar Mar 07 '23 02:03 josephnle

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

ranafaraznaru avatar May 01 '23 12:05 ranafaraznaru

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

hoangmf avatar Oct 22 '23 06:10 hoangmf

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

mmswi avatar Nov 01 '24 15:11 mmswi

Since react-beautiful-dnd is now deprecated (see https://github.com/atlassian/react-beautiful-dnd/issues/2672) would it be a good time to reconsider the relecance of this issue ?

htech9 avatar Dec 31 '24 05:12 htech9