question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Picker not responding to touch correctly inside Touchable

See original GitHub issue

Describe 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:

  1. Render a <RNPickerSelect /> with children
  2. ‘react-native-picker-select’ then renders using renderAndroidHeadless()
  3. On a physical android device, tap the rendered <RNPickerSelect />
  4. Observe if this opens up the picker
  5. Repeat steps 3 and 4, 20 times
  6. 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:open
  • Created 3 years ago
  • Reactions:6
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

36reactions
johnlundcommented, Feb 26, 2021

fixAndroidTouchableBug={true} seems to solve this for me.

5reactions
neikercommented, Sep 11, 2020

Should be nice to release a new version with this fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
Android : Picker not responding to touch correctly inside Touchable.
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found