Popovers icon indicating copy to clipboard operation
Popovers copied to clipboard

Popup stays on screen

Open tazmancoder opened this issue 2 years ago • 5 comments

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 .

tazmancoder avatar Apr 20 '22 18:04 tazmancoder

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.

aheze avatar Apr 20 '22 23:04 aheze

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.

tazmancoder avatar Apr 21 '22 02:04 tazmancoder

Did you find another solution to this @tazmancoder ?

aehlke avatar Jan 22 '24 06:01 aehlke

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

tazmancoder avatar Jan 22 '24 13:01 tazmancoder

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

aehlke avatar Jan 22 '24 17:01 aehlke