TextInput with controled selection clear children when change position
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với reproducer jcubic/react-native-text-input được liên kết và tái hiện lỗi Android bằng cách sử dụng selection được kiểm soát với các children có style. So sánh input dựa trên children với input dựa trên value trong khi di chuyển con trỏ. Được xem là hoàn tất khi các children có style vẫn hiển thị sau khi selection thay đổi, kể cả khi có value ban đầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100