Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Drag and drop of text breaks select all → backspace #895

@Daniel15

Description

@Daniel15

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Drag and drop of text breaks the "select all" functionality

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Go to https://facebook.github.io/draft-js/
  2. Enter "Hello world test" in the input field
  3. Press Ctrl+A (Cmd+A on Mac OS) then backspace. Notice it deletes all the text (expected behaviour)
  4. Enter "Hello world test" in the input field again
  5. Double-click the word "test" to select it
  6. Drag and drop the word "test" after "Hello". The resulting text in the input field should be "Hellotest world", and your cursor should be after the word "Hellotest".
  7. Press Ctrl+A then backspace. Notice that the text is deselected, and it only deletes one character

What is the expected behavior?
Ctrl+A backspace should behave the same in both scenarios

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Latest version on Draft.js website (I'm also seeing this internally at Facebook)
Chrome 55.0.2883.87 on Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions