The text in the form input wrapped in react-draggable cannot be selected normally

Author: jwangyanglsCreated Apr 24, 2022Updated Sep 27, 2026
Labelsbugneeds-triage

As an example When I use the antd modal component (any component can be reproduced), I use the drag and drop function. At this time, if I add an input (or textarea) to the modal and write text in the input, then I write the text in the most input text. Hold down the left mouse button on the right and swipe left to select text (quickly), when the mouse slides outside of react-draggable, the background color of the selected text in the input disappears, and the input becomes the state of triggering the focus.

How can I avoid this abnormal situation?

The following three pictures represent snapshots taken during mouse movement 1. image 2. image 3. image

Source: react-grid-layout/react-draggable