Closed stuartflanagan closed 5 years ago
TouchableOpacity might implement its own listener to enter key and trigger onPress. This library is not responsible for this kind of callbacks from the elements itself since it is agnostic of which elements you wrap into withFocusable. onEnterPress will be triggered, this should be sufficient to implement the logic of listening to enter key press.
Thank you it is interesting that it knows it has focus though. As it has not been given focus natively.
To Reproduce When looking at the basic example provided, onPress is triggered when using a ReactNative TouchableOpacity component as well as onEnterPress. This does not occur with a regular HTML button element with onClick. Is this possible to achieve the same behaviour with a button and trigger the click as well? Just wondering how the React Native onPress is being fired.
Example: