Skip to content

onDrop breaks onSelect event #11379

@tobiasandersen

Description

@tobiasandersen

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

What is the current behavior?
After an onDrop event has fired inside an "editable" element (input, textarea, contentEditable), the onSelect event on that element will no longer fire when changing selection using the keyboard.

As you can see in this gif below, the onSelect event gets called each time I move the cursor around (using the arrow keys). But once the onDrop event has fired, onSelect will no longer fire when I move the cursor around (also using the keys):

react-onselect-bug

Here's the jsfiddle I used to record the video above.

What is the expected behavior?
The onSelect event should always fire when selection changes.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16 / Chrome 62

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions