Preventing text selection on drag with touch backend?
Author: philipaarsethCreated Aug 19, 2021Updated Jul 29, 2025
Hi,
Quick question as I couldn't find anything in the documentation.
Is there any way to disable text selection during a drag with TouchBackend and using MouseEvents?
Removing all the selection after is straight forward by throwing some code in the useDrag end() function, so I'm mainly talking about preventing the selection from ever appearing.
<DndProvider
backend={TouchBackend}
options={{ enableMouseEvents: true, enableHoverOutsideTarget: false }}
>Source: react-dnd/react-dnd