Android - Composer - Previous text is cut off after creating next line
未关闭
还没有人认领这个 Issue。
Issue: Author Provided Repro
Platform: Android
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Description
When the TextInput component is controlled and the multiline prop is set to true, the text gets cut off after writing some text and adding a new line. However, when a new character is added, the text displays correctly.
Steps to reproduce
- Add a TextInput
- set the value prop and onChangeText
- set as true the multiline prop
- Add some text
- Add a new line, tapping the Enter button on the keyboard
- The text is cut off
React Native Version
0.74.3
Affected Platforms
Runtime - Android
Output of npx react-native info
System:
OS: macOS 13.6.7
CPU: (10) arm64 Apple M1 Pro
Memory: 41.83 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.14.0
path: ~/.nvm/versions/node/v20.14.0/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.7.0
path: ~/.nvm/versions/node/v20.14.0/bin/npm
Watchman:
version: 2023.11.27.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/eduardograciano/.gem/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10671973
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/eduardograciano/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: false
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
-
Reproducer
https://github.com/gedu/android-composer-reproducer
Screenshots and Videos
https://github.com/user-attachments/assets/67a44e6e-c8bc-470a-b29b-48b7846b1d36
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 React Native 0.74.3 运行链接的 android-composer-reproducer,并在 Android 上操作一个受控的多行 TextInput。根据复现过程跟踪 TextInput 的行为,并验证插入新行后现有文本会立即保持可见,而不需要再输入另一个字符。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100