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.

Selecting a single character then typing it doesn't replace it #398

@gdehmlow

Description

@gdehmlow

I can replicate it on the DraftJS demo page by typing a single character (such as "t"), selecting it, then trying to type "t" again. "t" should get replaced, with the selection collapsing after the "t". Instead, this does not happen until I type "t" again. This does not happen if the character is different.

The editorState passed into onChange seems to think its selection's anchorOffset and focusOffset are the same after entering the character, which would be the correct behavior, but this isn't reflected in the selection itself.

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