TextInput with controled selection clear children when change position
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
If you have TextInput with styled Text element inside (instead of value) and when you add controlled selection, the children are ignored and you have blank text even when you have initialValue.
Steps to reproduce
- Create TextInput with children
- Make it controlled selection Input
- Change the selection to move the cursor
- The children disappear
React Native Version
0.72.6
Affected Platforms
Runtime - Android
Output of npx react-native info
System:
OS: Linux 6.6 Fedora Linux 39 (Xfce)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 4.72 GB / 15.28 GB
Shell:
version: 5.2.21
path: /bin/bash
Binaries:
Node:
version: 21.2.0
path: ~/.nvm/versions/node/v21.2.0/bin/node
Yarn: Not Found
npm:
version: 10.2.3
path: ~/.nvm/versions/node/v21.2.0/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 17.0.9
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/local/rvm/rubies/ruby-2.6.10/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Sorry, I have no idea why it can't find Android Studio and SDK on my system. I have them installed, and updated recently to 2023.1.1 from November 9, 2023.
Stacktrace or Logs
There are no stacktrace with this bug
Reproducer
https://github.com/jcubic/react-native-text-input.git
Screenshots and Videos
The First Input is with children (each line has it's on <Text>) the second is with value.
The same happens when you move the cursor in the bottom Input, the top content disappears.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた jcubic/react-native-text-input の再現コードから始め、スタイル付きの children を使った制御された selection で Android の失敗を再現します。カーソルを移動しながら、children ベースの input と value ベースの input を比較します。selection の変更後も、initial value がある場合を含めて、スタイル付きの children が表示されたままになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100