aheze / Popovers

A library to present popovers. Simple, modern, and highly customizable. Not boring!
MIT License
1.97k stars 113 forks source link

Popup stays on screen #31

Open tazmancoder opened 2 years ago

tazmancoder commented 2 years ago

I have a SwiftUI app that has a TabView. On the second tab I load contacts and present a popover when done loading contacts. When the popup is on screen if I tap any other tab I get the following error:

[Popovers] - No window was found when presenting popover. Please file a bug report (https://github.com/aheze/Popovers/issues).

The popover stays on the screen

Simulator Screen Shot - iPhone 13 Pro Max - 2022-04-20 at 12 59 18 .

aheze commented 2 years ago

I’ve seen this before, wasn’t able to figure out a universal solution. But anyway try dismissing the popover first before navigating to another tab.

tazmancoder commented 2 years ago

Well, it would be nice to come up with one. Unfortunately I can’t control if a user taps a tab. However, I did decide to have the popover dismiss after 1 sec. Hopefully that will work, thanks for getting back to me.

aehlke commented 9 months ago

Did you find another solution to this @tazmancoder ?

tazmancoder commented 9 months ago

No, I wasn't able to find another solution to this issue.

aehlke commented 9 months ago

@tazmancoder thanks - I figured out a solution: https://github.com/aheze/Popovers/issues/93#issuecomment-1903362448 by exposing presentedPopoverContainer and manipulating it in onDisappear