Description
Description
On web, when controlling the disabled state of a GH TouchableOpacity
using a TextInput
component (specifically onChangeText
), the button becomes stuck as disabled after attempting a click. This issue only occurs after trying to click on the TouchableOpacity
while it's disabled, and only when updating state using TextInput
's onChangeText
(There's a chance it's affected by other events, but I haven't tested). TouchableOpacity
works as intended when using another Pressable
to change the disabled state.
When stuck as disabled, onPress
doesn't fire and the opacity doesn't change. This behavior is inconsistent with RN's original TouchableOpacity
which correctly re-enables the TouchableOpacity
after a text change.
Steps to reproduce
- Attempt to click the disabled
TouchableOpacity
- Edit the text input (to trigger
onChangeText
) - Attempt to click the
TouchableOpacity
(which should be enabled)
Snack or a link to a repository
https://snack.expo.dev/@nathan_ahn/gesture-handler-textinput-disabled-bug
Gesture Handler version
2.14.1
React Native version
0.72.4
Platforms
Web
JavaScript runtime
None
Workflow
Expo managed workflow
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes