Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [iOS] Unable to open second level popup (e.g. to open popup B from popup A) #1764

Open
bondarenkod opened this issue Dec 14, 2021 · 12 comments
Labels
bug Something isn't working. Breaky break.

Comments

@bondarenkod
Copy link
Contributor

bondarenkod commented Dec 14, 2021

Description

iOS platform: Unable to display child popup when another is presented.
When you are trying to present child popup you can observe the following message in the Output window:

[Presentation] Attempt to present <Xamarin_CommunityToolkit_UI_Views_PopupRenderer: 0x7ff59af2f1c0> on
<Xamarin_Forms_Platform_iOS_PlatformRenderer: 0x7ff59ac0d750> 
(from <Xamarin_CommunityToolkit_Sample_iOS_Renderers_NoLineNavigationPageRenderer: 0x7ff59d0ea400>) 
which is already presenting <Xamarin_CommunityToolkit_UI_Views_PopupRenderer: 0x7ff59a90f2b0>.

This is happening because the popup control renderer is trying to be displayed on the same ui view controller twice.

I tried a small POC workaround, where I displayed the child popup using the parent popup view controller and it worked as expected:
image

Link to Reproduction Sample

repro repo
https://github.com/bondarenkod/XamarinCommunityToolkit/tree/bdf-issue-samples

Steps to Reproduce

  1. Start the XCT.Sample app
  2. Run the app using the iOS platform as the target
  3. Test Cases => Popup, GitHub #1764
  4. Press the Display Main Popup button.
  5. On the opened popup then press the display child popup button

Expected Behavior

By pressing the display child popup button the child popup must be opened

Actual Behavior

iOS does not display child popups.

Reproduction imagery

iOS:

14_12_2021__21_18_10__400b4f5a-0f94-4155-9fcc-aa10fe7c2755.mp4

Android (OK, working as expected):

Screen_Recording_20211214-212139.mp4
@bondarenkod bondarenkod added the bug Something isn't working. Breaky break. label Dec 14, 2021
@planyazilim
Copy link

Will there be any fixes about this issue?
Android works good but iOS cant open Popup from a Popup.

@planyazilim
Copy link

bodarenko do you have a solution fro this issue? I checked your solution but you put it community toolkit code.

@bondarenkod
Copy link
Contributor Author

bodarenko do you have a solution fro this issue? I checked your solution but you put it community toolkit code.

Not yet, my solution is poc only, more work is required.

@victordscott
Copy link

I am having this issue also. Hopefully, a fix is in the pipeline.

@pictos
Copy link
Contributor

pictos commented Mar 23, 2022

@bondarenkod are you using .NET MAIU already? If so I would like to know if you are able to try the Popup on CommunityToolkit.MAUI, I know this issue lives there as well, but I'm wondering if your fix will work there, if so let me know and I can make an effort to implement it on GA

@bondarenkod
Copy link
Contributor Author

m wondering if your fix will work there, if so let me know and I can make an effort to implement it on GA

Will try in a few days.

@bondarenkod
Copy link
Contributor Author

@bondarenkod are you using .NET MAIU already? If so I would like to know if you are able to try the Popup on CommunityToolkit.MAUI, I know this issue lives there as well, but I'm wondering if your fix will work there, if so let me know and I can make an effort to implement it on GA

@pictos
Hello! I'm sorry for the delay, I had to wait till the weekend. Also, I'm struggling with testing the project due to issues with my copy of VS2022. The VS randomly display target devices in the window, in 3 hours I've seen full set of attached devices only one time. That allowed me to complete the test on the Android device. So, the iOS part will be added a bit later, I'm going to reinstall the VS again.
03_04_2022__21_50_15__0bb5c6a2-513d-443f-b7b5-adb65702dd5d

Demo project link
Test results, child popup working as expected at:

  • iOS - TBD
  • Android - YES
  • Windows - NO

Video:

iOS
TBD

Android
https://user-images.githubusercontent.com/3184414/161443522-56ad3458-5a5e-4643-8b97-1f4b6fcc311e.mp4

Windows
https://user-images.githubusercontent.com/3184414/161443468-781ba9bf-864f-44f3-9d9a-32290dbbe4e6.mp4

@pictos
Copy link
Contributor

pictos commented Apr 3, 2022

@bondarenkod relax, take your time (: and thanks for looking into this.

I'm afraid that windows doesn't support this scenario, maybe we can block the LightDismiss feature and only allow the removal of popups when the user clicks on something inside the presented popup.

@bondarenkod
Copy link
Contributor Author

I did a clean setup for win & vs 2022 preview on virtual machine.
I am still not able to see any targets except local 'Windows machine'.
Will wait till the next update, maybe it will help.

@pictos
Copy link
Contributor

pictos commented Apr 4, 2022

@bondarenkod just to make sure, are you using the latest VS 2022 preview? And are you checking the Xamarin workload option on installer?

@mrbelk
Copy link

mrbelk commented Oct 11, 2022

I'm guessing there hasn't been any movement on this issue since April? I have encountered it myself testing some nested popups in iOS 16.

@srpujari17
Copy link

Do we have any solution for this issue in Xamarin forms ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working. Breaky break.
Projects
None yet
Development

No branches or pull requests

6 participants