callstack / callstack/react-native-paper
onPress beeing called after animation finishes
- Dominant language
- TypeScript
- Stars
- 14.5k
- Forks
- 2.2k
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 12
Description
### Current behaviour
When i press on any button that have ripple effect or animation its onPress event is called after ripple animation finishes.
### Expected behaviour
Suppose to trigger onPress imidiatly on tap.
### How to reproduce?
I just setup a barebone react native project and setup react native paper on top of it, so when i launch a screen from one to other onPress waits for button ripple animation to finish first then it opens a next screen.
### Preview
### What have you tried so far?
I tried disabling the ripple animation from paper provider settings it did improved the delay but still delay is noticeable and also i lose the animation as well.
### Your Environment
| software | version
| --------------------- | -------
| android | 14
| react-native | 0.76.1
| react-native-paper | ^5.12.5
| node | 22.0.0
| npm or yarn | npm
| expo sdk | sdk
Contributor guide
Research direction
Reproduce the delay in a barebone React Native project with React Native Paper on Android 14, using the versions listed in the issue. Start by isolating a button with a ripple or animation and observe when onPress fires relative to navigation. Done means taps trigger onPress immediately while the ripple animation remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100