Skip to content

Problem when input type changes from email to text #12062

@adrianimboden

Description

@adrianimboden

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

What is the current behavior?
When an input field changes from "email" to "text", an exception TypeError will be thrown from setSelection.
Screenshot

Reproduction
See here: https://github.com/adrianimboden/react-bug-reproduction

What is the expected behavior?
It should not crash because of an uncaught exception

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
master (4ca7855)
Firefox

This would be my proposed change to fix the issue: adrianimboden@db923b8

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