react / react/react-native

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

オープン
#53,440 コメント 7 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Component: TextInput Needs: React Native Team Attention Platform: iOS Type: New Architecture
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

必須の Expo Snack 再現コードから始め、React Native 0.80.1 を使用して iOS での動作を確認します。overflow が非表示で outline が有効な場合に、フォーカスされた TextInput がどのようにレンダリングされるかを追跡します。この構成でキーボードが開いたままになり、TextInput がフォーカスを保持すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。