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.

"onBackdropPress" runs when keyboard is open

See original GitHub issue

Info

react-native => “^0.57.8” react-native-modal => “^7.0.2” testing on “Samsung S9+”

Problem

I am testing on android, while everything functions properly when there is no keyboard, but when keyboard is open, the onBackdropPress executes when clicked inside the modal as shown below in the image: imageedit_2_8435245230

This is the style of the modal container:

container: {
        position: 'relative',
        padding: moderateScale(20),
        alignItems: 'flex-start',
        backgroundColor: '#fff',
        borderWidth: 1,
        borderColor: COLOR_BORDER_LIGHT,
        borderRadius: 30,
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
danielnmaicommented, Nov 18, 2019

yes, it’s still happening. Let me pull down an example code ASAP.

1reaction
mmazzarolocommented, Aug 22, 2019

@danielnmai thanks for reporting. I guess it could be solved by disabling onBackdropPress when the keyboard is open. It can be done directly in your app (just put the onBackdropPress in the state and change it based on the keyboard state), but the most elegant solution is probably putting it directly in react-native-modal. Anyone willing to tackle it with a PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent react native modal from moving up when ...
On ios it is working fine i.e. the keyboard opens over the modal component, but not on android. avoidKeyboard={false} is not working. This...
Read more >
react-native-modal - npm
Start using react-native-modal in your project by running `npm i ... avoidKeyboard, bool, false, Move the modal up if the keyboard is open....
Read more >
keyboardavoidingview modal | The search engine you control.
It works but it causes my modal to glitch and "flicker" when the keyboard opens, and it is really ugly. Has anyone encountered...
Read more >
Keep keyboard open - Expo Snack
placeholder="Autofocus to keep the. keyboard" style={{display: 'none'}} />. <Button title={'hide modal'}. onPress={() => setshowingModal(false)} />. </View>.
Read more >
react-native-community - Bountysource
The swippable modal opening when you click on map elements. ... Even when using onModalHide I'm running into issues when I want to...
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