atlassian / pragmatic-drag-and-drop

Fast drag and drop for any experience on any tech stack
https://atlassian.design/components/pragmatic-drag-and-drop
Other
7.86k stars 160 forks source link

Making an element draggable prevents user from highlighting and copying text content inside the element #50

Closed vietanhtran16 closed 3 weeks ago

vietanhtran16 commented 1 month ago

Replicate of the issue: It is happening on this example in the documentation too

We have something similar (also using a dragHandle too) on our side where each draggable element has text content inside it and it would be common for our user to copy text content from those element as it is kinda a note taking app. It seems like when user tries to highlight a text as it is a draggable, user can't highlight anymore.

How could we fix this? Thanks

alexreardon commented 1 month ago

I'll take a look

vietanhtran16 commented 1 month ago

Thank you @alexreardon 👍

vietanhtran16 commented 3 weeks ago

@alexreardon Is there a workaround that we can do for the moment to fix this issue on our side? Have you any luck with this?

alexreardon commented 3 weeks ago

Unfortunately it looks like browsers do not work well with text selection side of draggable="true" elements.

For the purpose of enabling text selection inside of a draggable area:

I am updating our list example to follow this pattern