Skip to content

Focus jumps between TextInputs #2162

Description

@maevic

The problem

Adding the property selectTextOnFocus to multiple TextInputs can cause the focus to jump between them indefinitely.

How to reproduce

Simplified test case:
https://codesandbox.io/s/nifty-kowalevski-tbmev

Video:
screen

Steps to reproduce:

  1. Click in first input
  2. Click another window, so the browser looses the focus
  3. Click in second input
  4. The focus should now jump between them

Expected behavior

The last clicked input should get the focus.

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): 0.17.5
  • React (version): 17.0.2
  • Browser: Chromium version 95.0.4638.54

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions