Skip to content

setSelectionRange is not a function #9596

@mklopets

Description

@mklopets

Do you want to request a feature or report a bug?
Report a bug. 🐛

What is the current behavior?
Trying to move the cursor in a contenteditable div, calling setSelectionRange on that div throws a TypeError:

element.setSelectionRange is not a function

Example code
https://jsfiddle.net/9xjma402/

What is the expected behavior?
Caret is moved, setSelectionRange is a function

Environments tested on
React 15.5.4
Chrome 57, Safari 10
macOS Sierra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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