TextInput onContentSizeChange triggers twice inside a Modal
オープン
まだ誰も着手していません。
0.76
Component: Modal
Component: TextInput
Issue: Author Provided Repro
Newer Patch Available
Type: New Architecture
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
When using a TextInput inside a Modal, the onContentSizeChange callback is triggered twice instead of once. Outside the Modal the event triggers correctly (only once).
Steps to reproduce
- Install and launch the application
- Observe that onContentSizeChange triggers once (as expected)
- Click on the "Show modal" button
- Notice that onContentSizeChange for the TextInput inside the Modal triggers twice (unexpected behavior)
React Native Version
0.76.0
Affected Platforms
Runtime - Android, Runtime - iOS
Output of npx react-native info
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Memory: 9.86 GB / 31.84 GB
Binaries:
Node:
version: 20.12.1
path: C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm:
version: 9.8.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
Android NDK: 22.1.7171670
Windows SDK: Not Found
IDEs:
Android Studio: AI-231.9392.1.2311.11330709
Visual Studio: Not Found
Languages:
Java: 17.0.8
Ruby: Not Found
npmPackages:
"@react-native-community/cli":
installed: 15.0.0-alpha.2
wanted: 15.0.0-alpha.2
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.0
wanted: 0.76.0
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
(NOBRIDGE) LOG 39.607845306396484
(NOBRIDGE) LOG 20.39215660095215
(NOBRIDGE) LOG 39.607845306396484
Reproducer
https://github.com/ilaloov/textinput-issue
Screenshots and Videos
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた再現用コードから始め、React Native 0.76.0を使用して、AndroidとiOSでModal内のTextInputを再現します。Modal/TextInputのエントリポイントからonContentSizeChangeイベントを追跡します。完了条件は、Modal内でコールバックが1回発火し、Modal外の動作と一致すること、そして影響を受ける両プラットフォームのリグレッションカバレッジがあることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100