Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Android (v9, Compose): diagonal swipe on a pager blocks vertical scrolling of a ScrollView inside a page

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

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, react-native, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Start in ComposePagerView.kt, especially updateSameOrientationAncestorsGestureStateForMove, which the report identifies as the likely direction-check entry point. Reproduce with a vertically scrolling ScrollView and a mostly vertical diagonal drag, then inspect related issues #955 and #606 for context. Done when vertical scrolling continues for that gesture while intentional horizontal pager swipes still work.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment

  • react-native-pager-view 9.0.7 (Android, Compose implementation)
  • react-native 0.88.0, Expo SDK 58 (Expo Go)
  • used through react-native-tab-view 4.3.4 (bottom tab bar, swipeEnabled: true)

Steps to reproduce

  1. Put a vertically scrolling ScrollView with tall content on a page of the pager.
  2. Drag a finger on it slightly diagonally (mostly vertical, a bit sideways).

Expected

The ScrollView keeps scrolling vertically (this is how it behaved with pager-view 8.x / ViewPager2).

Actual

The pager takes over the gesture as a horizontal swipe, and vertical scrolling stops until the finger is lifted.

Workaround

Using the JS PanResponderAdapter from react-native-tab-view on Android, which requires |dx| > 2·|dy| to start a horizontal swipe.

Possible cause

The direction check in ComposePagerView.kt (updateSameOrientationAncestorsGestureStateForMove) seems to treat a gesture as horizontal too eagerly.

Possibly related: #955, #606.

Ngôn ngữ chính
TypeScript
Star
3.4k
Fork
490
Merge trung bình
2 ngày 5 giờ
Pull request đã merge (30 ngày)
34

Chuẩn bị môi trường

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.

Issue khác của callstack/react-native-pager-view

Tất cả issue của callstack/react-native-pager-view

Issue tương tự

Thêm issue về TypeScript

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.