atlassian / react-beautiful-dnd

Beautiful and accessible drag and drop for lists with React
https://react-beautiful-dnd.netlify.app
Other
33.4k stars 2.58k forks source link

Mark element as interactable #1457

Open xenopeg opened 5 years ago

xenopeg commented 5 years ago

A way to mark an element as Interactable besides having it be one of the input elements or having the contenteditable attribute.

I'm currently using an AceEditor inside a Draggable and wasn't able to select text inside the editor.

For now I changed isAnInteractiveElement to also look for an interactable attribute, same way it is already checking for a contenteditable one and nothing seems to have broken yet.

Seems to be a simple enough feature that might be worth supporting.

( It's also possible that there's already a way to do this and I just missed it )

chinanderm commented 4 years ago

This would be really great to have. In my application, when a draggable is in a certain state, I'd like the user to be able to select text that isn't in an interactive element (input, textarea, etc). However, I cannot allow that functionality at the moment because the dragging takes over and I don't see how I can cancel that.