`ScrollView` `contentContainerStyle`'s `flexGrow` doesn't account for `contentInsetAdjustmentBehavior` or `automaticallyAdjustKeyboardInsets`
Đang mở
Chưa có ai nhận issue này.
API: Keyboard
Component: ScrollView
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
This is a reopen of https://github.com/facebook/react-native/issues/25282 which is still reproducible in the latest React native version.
Steps to reproduce
- Create a
ScrollViewwithcontentInsetAdjustmentBehavior="automatic"andcontentContainerStyle={{flexGrow: 1}}. - Observe that the content container grows larger than the ScrollView's height, while the height is expected to match, because safe area insets would be accounted for.
See the Expo snack
React Native Version
0.75.3
Affected Platforms
Runtime - iOS
Output of npx react-native info
N/A — easy to reproduce
Stacktrace or Logs
N/A
Reproducer
https://snack.expo.dev/@louay/scrollview-layout-contentinset-issue
Screenshots and Videos
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 Expo Snack được liên kết và tái hiện hành vi trên iOS bằng cách sử dụng ScrollView, contentContainerStyle={{flexGrow: 1}}, contentInsetAdjustmentBehavior="automatic" và automaticallyAdjustKeyboardInsets. Được xem là hoàn tất khi chiều cao của vùng chứa nội dung tính đến các inset liên quan thay vì tăng vượt quá chiều cao của ScrollView.
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