kkemple / kkemple/react-native-sideswipe

Touch events on SideSwipe prevent scrolling in ScrollView

Open
#59 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
900
Forks
69
PR merge metrics
No merged PRs in 30d

Description

When using SideSwipe in a `ScrollView`, touch events on SideSwipe are unconditionnally captured and prevent the screen from scrolling. The culprit seems to be:
```js
onStartShouldSetPanResponder: () => true,
```
It always makes SideSwipe the pan responder has soon has we touch it. SideSwipe should be a bit more lax about being the responder. Using the `shouldCapture` callback works fine for me:
```js
onStartShouldSetPanResponder: () => this.handleGestureCapture,
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the SideSwipe pan responder setup, especially onStartShouldSetPanResponder and the shouldCapture callback described in the issue. Reproduce SideSwipe inside a ScrollView, then verify that the screen scrolls while SideSwipe gestures still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.