Skip to content

Bug: performing input.select() in IE11 throws a React error #20990

@Dremora

Description

@Dremora

The example below is extracted from the app with a spreadsheet-like UI, where cells become editable upon focus (can be achieved either by tabbing into the cells or clicking). The text in such cell immediately becomes selected.

The bug occurs only in IE11, as the user navigates from one such cell to another by clicking.
Likely related to #19664.

React version: 17.0.1

Steps To Reproduce

  1. Clone https://github.com/Dremora/react-i11-input-focus-bug
  2. Install dependencies (yarn) and start the app (yarn start)
  3. Open http://localhost:3000 in IE11
  4. Click on the text saying hello
  5. Click on the text saying world

Link to code example: https://github.com/Dremora/react-i11-input-focus-bug/blob/master/src/App.js

The current behavior

Unspecified error gets logged to the console, followed a few other errors, one of them being Should not already be working error. As this is a React internals error, application stops working. Nothing gets thrown in the user-land code.

The expected behavior

world text gets selected.

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