react / react/react-native

`ScrollView` `contentContainerStyle`'s `flexGrow` doesn't account for `contentInsetAdjustmentBehavior` or `automaticallyAdjustKeyboardInsets`

Đang mở
#46,722 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
  1. Create a ScrollView with contentInsetAdjustmentBehavior="automatic" and contentContainerStyle={{flexGrow: 1}}.
  2. 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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.