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.

Picker modal is triggering from a press anywhere on the screen

See original GitHub issue

Describe the bug Pressing anywhere on the screen (except my TabNavigator) is causing the Selection modal to appear.

To Reproduce

            <Picker
              hideIcon={true}
              items={[ {label: '+1', value: '+1'}, {label: '+64', value: '+64'} ]}
              onValueChange={(value, idx) => this.handleCodeSelection(value, idx)}
              placeholder={{}}
              style={{inputAndroid: { color: colors.white, height: 50, width: 50, backgroundColor: colors.white }}}
              useNativeAndroidPickerStyle={false}
            />

Expected behavior Only open the Selection modal when the Picker element is pressed.

Smartphone (please complete the following information):

  • Device: Pixel 2XL
  • OS: Android v9
  • react-native-picker-select version: 5.1.1
  • react-native version: 0.57.7
  • react version: 16.6.0-alpha.8af6728

Reproduction and/or code sample Provide a link to a reproduction of this issue on https://snack.expo.io or a good explanation on why you can not. Not including a link will result in a significant delay in our ability to address this issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
andercardcommented, Dec 19, 2018

To solve this problem you should only add the following

   viewContainer: {      position: 'relative',    },    headlessAndroidPicker: {      left: 0,      width: '100%',      height: '100%',    },

He painted the blue background to show what happens with headlessAndroidPicker

https://imgur.com/a/5v6gDnE

0reactions
lfkwtzcommented, Jan 25, 2019

@Friendly-Robot @VKravchukEleks @apolineaire - can you check if v5.2.3 fixes the issue? (thanks @andercard )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap modal: background jumps to top on toggle
Possibly working with modals nested somewhere in the code: body.modal-open { overflow: visible; position: absolute; width: 100%; height:100%; }.
Read more >
Picker Modal | Framework7 v1 Documentation
Picker Modal is a special overlay type which is similar to Picker/Calendar's overlay. Such modal allows to create custom picker overlays with custom...
Read more >
How to Prevent Bootstrap Modal from Closing when Clicking ...
How to prevent Bootstrap modal from closing when clicking outside · Answer: Use the Modal's backdrop Option · Related FAQ.
Read more >
Bootstrap Modal - examples & tutorial
Modal is a responsive popup used to display extra content. That includes prompts, configurations, cookie consents, etc. Use MDB modal plugin to add...
Read more >
Popovers - Bootstrap
Elements with the disabled attribute aren't interactive, meaning users cannot hover or click them to trigger a popover (or tooltip). As a workaround,...
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