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

Fermée
#1,205 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@lukewalczak y travaille déjà.

Depuis le 30/10/2026.

  • #1218 par @lukewalczak — fusionnée

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
67/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
android, react-native, typescript
Domaine
mobile

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
3.4k
Forks
490
Merge moyen
2 j 4 h
PR mergées (30 j)
44

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de callstack/react-native-pager-view

Toutes les issues de callstack/react-native-pager-view

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.