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

Open
#653 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start by reproducing the issue with an antd modal containing an input or textarea inside react-draggable, then inspect how text selection behaves when the pointer leaves the draggable area. The work is done when dragging across the boundary preserves the input's selected text and focus behavior; no repository file or test is named in the issue.

Written by the indexing model from the issue text.

Description

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

Dominant language
JavaScript
Stars
9.3k
Forks
1k
Avg merge
3d 8h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-grid-layout/react-draggable

All issues in react-grid-layout/react-draggable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.