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.

🐛 focus() sets cursor at the beginning of all text #2502

@MichaelDeBoey

Description

@MichaelDeBoey

What is the current behavior?
When focussing the editor (using focus()), the cursor is shown at the beginning of all text.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
https://codesandbox.io/s/draft-js-focus-bug-ntsry?file=/src/RichTextEditor.tsx

What is the expected behavior?
When focussing the editor, the cursor should be at the end of all text.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
I'm using latest version of draft-js (0.11.6) on both Google Chrome & Safari.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions