Commit ef531eb
[Android] Fix ScrollView momentum after JS responder cancellation (#4203)
## Description
This removes the responder-release callback that cleared shouldIntercept
as soon as a Gesture Handler finished.
Clearing interception during the same terminal `ACTION_UP` dispatch
allowed the event to fall through to the regular `React/native` dispatch
path after it had already been forwarded by `NativeViewGestureHandler`.
For wrapped ScrollViews, that extra release event could prevent native
fling from starting, breaking scroll momentum.
The root view already resets `shouldIntercept` when the next touch
stream begins, so keeping interception through the end of the current
stream preserves the expected scroll behavior without leaving future
touches blocked.
## Test plan
Checked ScrollView and `cancelsJSResponder` example
<!--
Describe how did you test this change here.
-->
---------
Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>1 parent fba4dcc commit ef531eb
3 files changed
Lines changed: 0 additions & 12 deletions
File tree
- packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler
- core
- react
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 148 | | |
156 | 149 | | |
157 | 150 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
0 commit comments