You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First time onPress is called when pressing the Enter key down and the second time it is called when releasing the Enter key.
Expected behavior
onPress is only called once, like it is when using Space key oder pressing the button with the mouse.
Steps to reproduce
Use and apply an onPress handler to it
Set a disabled state inside the onPress handler
Put some console.log inside the onPress handler
Activate your button using the keyboard (tab), pressing the Enter key
See your console.log twice in the console
Workaround
Need to use onPressIn instead of onPress
NativeBase Version
3.4.28
Platform
Android
CRA
Expo
iOS
Next
Other Platform
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
When using the onPress prop on the Button component the function get's called twice when used a enter key via keyboard
CodeSandbox/Snack link
https://snack.expo.dev/@seemran.xec/nativebase-template
Steps to reproduce
First time onPress is called when pressing the Enter key down and the second time it is called when releasing the Enter key.
Expected behavior
onPress is only called once, like it is when using Space key oder pressing the button with the mouse.
Steps to reproduce
Use and apply an onPress handler to it
Set a disabled state inside the onPress handler
Put some console.log inside the onPress handler
Activate your button using the keyboard (tab), pressing the Enter key
See your console.log twice in the console
Workaround
Need to use onPressIn instead of onPress
NativeBase Version
3.4.28
Platform
Other Platform
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: