onPress works after delay on Android
See original GitHub issueIssue Description
"react-native-draggable-flatlist": "2.0.10", "react-native": "0.61.5",
Simple instance.
<DraggableFlatList
data={this.props.words}
renderItem={this.renderItem}
...
/>
Any touchable components inside of renderItem component works only after some press delay. Only click is not working, it needs press and wait a bit. Looks like it’s about 100-200 ms. iOS works perfectly, problem is only on Adroid.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:28 (15 by maintainers)
Top Results From Across the Web
React Native onPress event delay - Stack Overflow
when I touch TouchableOpacity or TouchableWithoutFeedback in Android there is some second delay for trigger onPress event and I don't know why.
Read more >TouchableWithoutFeedback - React Native
Importantly, TouchableWithoutFeedback works by cloning its child and applying ... This time period can be customized with delayLongPress .
Read more >Buttons | React Native Gesture Handler - Software Mansion
function that gets triggered when the button gets pressed for at least delayLongPress milliseconds. rippleColor (Android only). defines color of native ripple ...
Read more >Button | Android Developers
To specify an action when the button is pressed, set a click listener on the button object ... android:scrollbarDefaultDelayBeforeFade, Defines the delay in ......
Read more >[Resolve]-React Native onPress event delay - appsloveworld
when I touch TouchableOpacity or TouchableWithoutFeedback in Android there is some second delay for trigger onPress event and I don't know why. anyone...
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 Free
Top 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
Hi there all / @computerjazz!
I can confirm that applying the
react-native-gesture-handler
touchables works well to solve this one. In my case I’m applying them as an alternative component based on the platform to my ListItem as follows (this example is incomplete obviously):Likely should still be looked into as a bug, but this workaround is fully functional and doesn’t seem to have any negative effects. Enjoy!
Same issue here. I used this workaround but I am not so satisfied with it:
https://github.com/computerjazz/react-native-draggable-flatlist/issues/99#issuecomment-569099474