XamarinCommunityToolkit
XamarinCommunityToolkit copied to clipboard
[Bug] [iOS] Unable to open second level popup (e.g. to open popup B from popup A)
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:
Link to Reproduction Sample
repro repo https://github.com/bondarenkod/XamarinCommunityToolkit/tree/bdf-issue-samples
Steps to Reproduce
- Start the XCT.Sample app
- Run the app using the iOS platform as the target
-
Test Cases
=>Popup, GitHub #1764
- Press the
Display Main Popup
button. - 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:
https://user-images.githubusercontent.com/3184414/146064877-a95206b3-727b-4852-a98d-7778fc094b43.mp4
Android (OK, working as expected):
https://user-images.githubusercontent.com/3184414/146066244-f1f182c0-aeb9-4d79-a59e-1528e3a96077.mp4
Will there be any fixes about this issue? Android works good but iOS cant open Popup from a Popup.
bodarenko do you have a solution fro this issue? I checked your solution but you put it community toolkit code.
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.
I am having this issue also. Hopefully, a fix is in the pipeline.
@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
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 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.
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
@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.
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.
@bondarenkod just to make sure, are you using the latest VS 2022 preview? And are you checking the Xamarin
workload option on installer?
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.
Do we have any solution for this issue in Xamarin forms ?