Android: Picker not responding to touch correctly inside Touchable
See original GitHub issueDescribe the bug
Under certain conditions on physical Android devices, tapping on <RNPickerSelect />
does not always trigger the dialog menu to show.
The root cause of this issue appears to be rendering a <Picker />
inside of a <TouchableOpacity />
More info: https://github.com/facebook/react-native/issues/25203
To Reproduce
Steps to reproduce the behavior:
- Render a
<RNPickerSelect />
with children - ‘react-native-picker-select’ then renders using
renderAndroidHeadless()
- On a physical android device, tap the rendered
<RNPickerSelect />
- Observe if this opens up the picker
- Repeat steps 3 and 4, 20 times
- Observe that the picker has not opened 20 times
Expected behavior
After tapping a <RNPickerSelect />
20 times, the picker should have also opened 20 times.
Screenshots
“n/a”.
Additional details
- Device: OnePlus 5T
- OS: Android 9
- react-native-picker-select version: 6.6.0
- react-native version: 0.62.2
- expo sdk version: n/a
Reproduction and/or code sample
https://snack.expo.io/@deansimcox/brave-cashew
Note: Please make sure you run this expo snack on an actual android device, the issue is not present when using the Android view on expo.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Touchable presses not firing in absolute positioned container ...
Product: I am writing a cross platform dropdown component · Issue/Behavior: On iOS the presses fire correctly, however on android they fall off....
Read more >ProgressBar - Android Developers
Use indeterminate mode for the progress bar when you do not know how long an ... ArrayList, int, int) should add only Views...
Read more >Handling Touches - React Native
If the basic button doesn't look right for your app, you can build your own button using any of the "Touchable" components provided...
Read more >User Interface - App Inventor
Some fonts do not support italic. FontSize: Specifies the text font size of the DatePicker , measured in sp(scale-independent pixels).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixAndroidTouchableBug={true}
seems to solve this for me.Should be nice to release a new version with this fix