[iOS] The scroll position of the multiline TextInput affects the ScrollView auto-scroll when the keyboard opens/closes
Đang mở
Chưa có ai nhận issue này.
API: Keyboard
Component: ScrollView
Component: TextInput
Issue: Author Provided Repro
- 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
On iOS, when using a ScrollView with automaticallyAdjustKeyboardInsets and a multiline TextInput, the scroll position of the TextInput affects how the ScrollView auto-scrolls when the keyboard opens or closes.
Steps to reproduce
<ScrollView automaticallyAdjustKeyboardInsets>
// Any content above the TextInput to position it at the bottom of the screen
<TextInput multiline style={{ height: 100 }} /> // multiline TextInput with fixed height and many lines of text (let say 20)
// More content to allow the ScrollView to scroll if needed
</ScrollView>
- ScrollView with automaticallyAdjustKeyboardInsets
- Content above the TextInput to fill the screen
- Multiline TextInput with fixed height and many lines of text
- Content below the TextInput to allow the ScrollView to scroll if needed
- Focus on the input and scroll it to the end
- Scroll the ScrollView to align the TextInput at the bottom of the screen
- Focus on the last line in the TextInput
- The keyboard slides up, and the ScrollView scrolls too much
- With the keyboard open, scroll the ScrollView to align the TextInput at the bottom of the screen (above the keyboard)
- Close the keyboard
- The ScrollView scrolls up
React Native Version
0.79.5
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
This is not relevant
Stacktrace or Logs
This is not relevant
MANDATORY Reproducer
Screenshots and Videos
https://github.com/user-attachments/assets/1566ea6e-e936-4670-a18a-80090857f58c
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 iOS Snack bắt buộc và so sánh hành vi của ScrollView và multiline TextInput khi mở và đóng bàn phím. Theo dõi cách xử lý automaticallyAdjustKeyboardInsets, sau đó xác minh rằng ScrollView không còn cuộn quá xa khi mở bàn phím hoặc dịch lên trên khi đóng bàn phím.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, 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
- 42/100