We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a877a02 commit 366f0e9Copy full SHA for 366f0e9
packages/react-native-web/src/exports/TouchableOpacity/index.js
@@ -88,7 +88,11 @@ function TouchableOpacity(props: Props, forwardedRef): React.Node {
88
onLongPress,
89
onPress,
90
onPressStart(event) {
91
- setOpacityActive(event.dispatchConfig.registrationName === 'onResponderGrant' ? 0 : 150);
+ const isGrant =
92
+ event.dispatchConfig != null
93
+ ? event.dispatchConfig.registrationName === 'onResponderGrant'
94
+ : event.type === 'keydown';
95
+ setOpacityActive(isGrant ? 0 : 150);
96
if (onPressIn != null) {
97
onPressIn(event);
98
}
0 commit comments