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.

Can't display a dialog after popover did close (iOS only)

See original GitHub issue

Describe the bug In popoverDoneClosing I want to open the Alert dialog. On iOS, the alert closes straight after it showed and after that the app freezes. You can’t tap anything, my guess is that popover modal doesn’t close properly and overlays the entire screen (like in #16). If you wrap Alert in setTimeout with 0 (zero) interval you may get this behavior after the second hit. You can try it out in this Expo Snack: https://snack.expo.io/HJFjG-G9V With 100 interval, it’s pretty much ok, but it still freezes occasionally. Expected bevavior: I call Alert in popoverDoneClosing and it displays without closing and freezing the app, without the need to set a timeout.

Device/Setup Info:

  • Device: any iPhone
  • OS: iOS 12.2
  • react-native version: 0.58.5
  • react-native-popover-view version: 1.0.19

Debug Output This bug does not reproduce when Remote Debug is enabled.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
SteffeyDevcommented, Apr 17, 2019

I was not aware, let me add a platform check in there…

1reaction
SteffeyDevcommented, Apr 15, 2019

I ran into this issue as well recently, for a quick fix you can pass in showInModal={false}. This won’t make a difference as long as you keep the popover as a child of a top-level view, but will have issues if the popover is nested down a few levels inside views with padding and margin.

I agree this is an issue and I may be able to fix this by tying into the Modal onDismiss prop (https://facebook.github.io/react-native/docs/modal#ondismiss), I’m working on some updates in this area now so keep an eye out for a fix in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

swift - Dismiss Popover after touch - Stack Overflow
Once the LastViewController is dismissed and I'm back in the MainViewController the popover remains open. Inside the PopOverController I only have the default ......
Read more >
UIAlertController disappearing sin… | Apple Developer Forums
it was working on iOS 12, the method was showing the Alert from the AppDelegate and any ViewController, but every UIAlertController disappear automatically ......
Read more >
Bootstrap Modal Dialog showing under Modal Background
The easiest solution is to move the modal dialog outside of any container and just declare it under the <body> element, or -...
Read more >
SteffeyDev/react-native-popover-view: A well-tested ... - GitHub
This is because the Popover component uses ref to find the position of the from component on the screen, so that it can...
Read more >
Prevent Page Scrolling When a Modal is Open | CSS-Tricks
That's because modals are elements on a page just like any other. It may stay in place (assuming that's what it's meant 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