ScrollView starts scrolled to bottom inside Modal if Pressable inside
Đang mở
Chưa có ai nhận issue này.
Component: Modal
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
If I use a ScrollView with an Pressable at the end of content container inside a Modal, the scroll position is initially at the bottom.
Here is a minimal example: https://snack.expo.dev/ZmDt9FQIQjzw0x8SM6-XD
Steps to reproduce
- Create a Modal
- Inside create a Scrollview and fill content
- Add Pressable at bottom
- Open Modal with ScrollView
React Native Version
0.73.4
Affected Platforms
Runtime - Web
Output of npx react-native info
System:
OS: Windows 11 10.0.22621
CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 3.74 GB / 15.37 GB
Binaries:
Node:
version: 20.9.0
path: C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm:
version: 9.3.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-223.8836.35.2231.11090377
Visual Studio: Not Found
Languages:
Java:
version: 17.0.10
path: C:\Program Files\Eclipse Foundation\jdk-17.0.10\bin\javac.EXE
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.4
wanted: 0.73.4
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
-
Reproducer
https://snack.expo.dev/ZmDt9FQIQjzw0x8SM6-XD
Screenshots and Videos
No response
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 bằng cách chạy Snack reproducer được liên kết trên web với phiên bản React Native đã báo cáo, sử dụng Modal, ScrollView và Pressable ở phía dưới được mô tả trong các bước. Theo dõi hành vi trên web xác định vị trí ban đầu của ScrollView; hoàn thành khi Modal mở ở đầu nội dung thay vì đã cuộn xuống cuối.
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
- frontend, web-dev
- 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