Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onPress event not firing on Android devices (victory-native) #3018

Open
2 tasks done
Makar8000 opened this issue Dec 18, 2024 · 1 comment
Open
2 tasks done

onPress event not firing on Android devices (victory-native) #3018

Makar8000 opened this issue Dec 18, 2024 · 1 comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior

Comments

@Makar8000
Copy link

Makar8000 commented Dec 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Victory version

"victory-native": "37.0.2",
"react-native-svg": "15.8.0"

Code Sandbox link

https://snack.expo.dev/-8jFnfC69c-pJB3gQJhs_

Bug report

When using a physical Android device, the `onPress` event will not be fired for Victory components. This happens regardless of what containerComponent you use. In the provided snack I have used `VictoryBar` with `VictoryZoomContainer`.

The issue is not reproducible on iOS physical device, iOS simulator, or Android simulator. The issue only appears when running on a physical Android device.

Steps to reproduce

Open the snack link provided, then:
1) Run the app using the Android simulator provided on the right.
2) Tap on any bar.
3) Check console logs. All events will fire as expected.
4) Run the app using the "My Device" and use a physical Android device.
5) Tap on any bar.
6) Check console logs. `onPressIn` will fire as expected, `onPressOut` will fire immediately (unexpected), and `onPress` does not fire at all.

Expected behavior

The onPress event should be fired when user taps on the respective Victory component

Actual behavior

The onPress event does not fire at all. Furthermore, the onPressOut event fires immediately after onPressIn, instead of firing when the user releases a press

Environment

- Device: Android physical devices (tested so far: Pixel 8, Samsung Galaxy S23)
- OS: Android 15
- Node: 20
- npm: 10
@Makar8000 Makar8000 added the Type: Bug 🐛 Oh no! A bug or unintentional behavior label Dec 18, 2024
@Makar8000
Copy link
Author

Related: #2131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Oh no! A bug or unintentional behavior
Projects
None yet
Development

No branches or pull requests

1 participant