react / react/react-native

[iOS] Adding outline to `TextInput` causes it to lose focus

Open
#53,440 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: TextInput Needs: React Native Team Attention Platform: iOS Type: New Architecture
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Description

On iOS, if TextInput with overflow: hidden is rendered with an outline while focused, it immediately loses focus. This also means that if outline is used to indicate focus state (like on web), the TextInput becomes impossible to interact with.

Steps to reproduce
  1. Run the snack
  2. Switch on "Enable outline"
  3. Press on the text input
  4. Notice how the keyboard closes immediately, and the text input loses focus
React Native Version

0.80.1

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info
N/A — reproduces via Expo Snack/Expo Go
Stacktrace or Logs
N/A
MANDATORY Reproducer

https://snack.expo.dev/@simplecreations/ios---adding-outline-to-textinput-causes-it-to-lose-focus

Screenshots and Videos

https://github.com/user-attachments/assets/de1bdfc6-c0f1-4b71-af15-fce5e45b58c0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mandatory Expo Snack reproducer and confirm the behavior on iOS with React Native 0.80.1. Trace how the focused TextInput is rendered when overflow is hidden and the outline is enabled. Done means the keyboard remains open and the TextInput retains focus in that configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.