<RectButton> becomes unresponsive when used within a List
See original GitHub issueDescription
Using a RectButton in a List component (FlatList/SectionList) will become unresponsive in certain scenarios. I am not sure whether this is an incorrect usage of this library or it’s something new with RN. This wasn’t an issue in production before.
- It’s observed that the event handler is not called when it’s unresponsive
It’s observed that when RectButton is unresponsive, it’s also unresponsive to swipe up to close the android app- It’s observed that using the same example, it cannot be reproduced on Snack
- Finally, setting
shouldActivateOnStart=true
on RectButton seems to solve the issue - Additionally, I initially thought it’s because I’m not using RectButton inside RNGH’s ScrollView so I’ve added a SectionList export via
patch-package
. This also seems to solve the issue other than settingshouldActivateOnStart=true
.
Platforms
- iOS
- Android
- Web
Screenshots
Steps To Reproduce
Using RN’s SectionList
- Scroll multiple times to the bottom of the list
- All <RectButton> instances become unresponsive
- Navigate to “Solution” by pressing the button in Header
- All <RectButton shouldActivateOnStart> instances are still responsive (however the ripple effect is gone)
- Exit and reload the app and navigate straight to “Solution” and repeat Step 1
- Everything works fine
Using re-exported SectionList by overriding its ScrollViewComponent with RNGH’s ScrollView via renderScrollComponent
- Apply the package by running
yarn patch-package
- Scroll multiple times to the bottom of the list
- Everything works fine
Expected behavior
- RectButton does not become unresponsive when used within a List component on Android
Actual behavior
- RectButton becomes unresponsive when used within a List component Android
Snack or minimal code example
https://github.com/nujhong/RNGH-RectButton-In-a-List
Package versions
- React:
18.0.0
- React Native:
0.69.1
- React Native Gesture Handler:
2.5.0
- React Native Reanimated:
2.9.1
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Nested touchables don't work correctly on Android #784
Everything works fine in iOS but Android is trigger both onPress events ... <RectButton> becomes unresponsive when used within a List #2160.
Read more >React-Native Button onPress not working - Stack Overflow
When I refresh the page, I get the alert without clicking on the button and after I close the alert and click on...
Read more >Buttons | React Native Gesture Handler - Software Mansion
Gesture handler's buttons recognize touches in native which makes the recognition ... Below is a list of properties specific to RectButton component: ...
Read more >OpenWindows Desktop Reference Manual - Oracle Help Center
This section is provided as a guidance on use. This section lists special rules, features and commands that require in-depth explanations. The subsections....
Read more >An Independent Measurement System for Performance ...
Certain commercial entities, equipment, or materials may be identified in this document in order to describe.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
An update that is hopefully useful @j-piasecki
This seems to be a problem specific to
react-native-gesture-handler@2.5.0
+ Android 12, without regards toreact-native
, as Expo SDK 46 also bumped it from2.2.0
to2.5.0
.For the peers, we eventually downgraded it to
2.3.2
and it works for us without any workarounds now.@itsramiel yes, in my example, you can also see that I can’t even press the top right header button. It was only working when I added
shouldActivateOnStart
. I’m back to business now, I will try to pull in the draft to see if that resolves the issue.