react-navigation / react-navigation/react-navigation
Pressable elements not working in native-stack on Android devices with new architecture
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 24.5k
- Forks
- 5.1k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 18
Description
Current behavior
When using Android devices (iOS and Android emulator is fine) you cannot use onPress in the header bar. onPressIn and onPress out does work. This was tested mostly with Samsung devices.
This only happens with native-stack / Expo Router.
Please have a look here: https://github.com/expo/expo/issues/30032
Further information also in the linked issue in the facebook/react-native repo.
Expected behavior
onPress should work also on physical Android devices.
Reproduction
https://github.com/DrZoidberg09/RN-Android-Touch-Issue/
Platform
- Android
- iOS
- Web
- Windows
- MacOS
Packages
- @react-navigation/bottom-tabs
- @react-navigation/drawer
- @react-navigation/material-top-tabs
- @react-navigation/stack
- @react-navigation/native-stack
- react-native-tab-view
Environment
- [] I've removed the packages that I don't use
| package | version |
|---|---|
| @react-navigation/native | |
| @react-navigation/bottom-tabs | |
| @react-navigation/drawer | |
| @react-navigation/material-top-tabs | |
| @react-navigation/stack | |
| @react-navigation/native-stack | |
| react-native-safe-area-context | |
| react-native-screens | |
| react-native-gesture-handler | |
| react-native-reanimated | |
| react-native-tab-view | |
| react-native-pager-view | |
| react-native | |
| expo | |
| node | |
| npm or yarn |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and compare its native-stack behavior on a physical Android device, focusing on the difference between onPress and the working onPressIn/onPressOut handlers. Review the linked Expo and React Native issues for related findings, then verify that onPress works with the new architecture on affected devices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100