Picker() on Mac Catalyst does not display dialog with items
Description
Picker() on the modal page does not show a dialog for picking elements in Mac Catalyst. MAUI on .Net 8.
Steps to Reproduce
Create a page (ContentPage) and open it by OpenModalAsync(); On the page place a Picker() with simple string items, set in the page (no binding). Click on it. The dialog to pick the element does not appear. Binding to ViewModel does not change the situation.
Link to public reproduction project repository
https://github.com/arseniigorkin/MAUIPickerIssue
Version with bug
8.0.7, 8.0.20
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response
I believe that's because the Picker on Mac Catalyst opens a modal with the options to select. AFAIK You can't have multiple modals open at the same time in Catalyst, so unless the control is reimplemented to not require a modal, you couldn't use it from within a modal view.
I believe that's because the Picker on Mac Catalyst opens a modal with the options to select. AFAIK You can't have multiple modals open at the same time in Catalyst, so unless the control is reimplemented to not require a modal, you couldn't use it from within a modal view.
Actually, the Alert works just fine in the same conditions and it was an issue some time ago that alert could be displayed in the modal page on Mac but then it was fixed (you can check, it works). Thus the problem relates only to Picker and it is a subject to fix, as I believe. Our production stuck with this issue now.
Hi @arseniigorkin. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Hi! I have just posted a working demo for you. As you can see it does not work on Mac Catalyst only. I hope it helps.
Verified this issue with Visual Studio for mac 17.6.10(build428)(8.0.14/8.0.3). Can repro on Maccatalyst platform with sample project, and android platform works fine
I believe that's because the Picker on Mac Catalyst opens a modal with the options to select. AFAIK You can't have multiple modals open at the same time in Catalyst, so unless the control is reimplemented to not require a modal, you couldn't use it from within a modal view.
Actually, the Alert works just fine in the same conditions and it was an issue some time ago that alert could be displayed in the modal page on Mac but then it was fixed (you can check, it works). Thus the problem relates only to Picker and it is a subject to fix, as I believe. Our production stuck with this issue now.
I never said it shouldn't be fixed (to be clear, I don't work on MAUI, I'm just a member in .NET trying to help). That's all.
On 8.0.20 still not working
Hey all! It is more than a month this issue is open. Is there any update on it? Any workaround? Thanks!
I believe that's because the Picker on Mac Catalyst opens a modal with the options to select. AFAIK You can't have multiple modals open at the same time in Catalyst, so unless the control is reimplemented to not require a modal, you couldn't use it from within a modal view.
Actually, the Alert works just fine in the same conditions and it was an issue some time ago that alert could be displayed in the modal page on Mac but then it was fixed (you can check, it works). Thus the problem relates only to Picker and it is a subject to fix, as I believe. Our production stuck with this issue now.
I never said it shouldn't be fixed (to be clear, I don't work on MAUI, I'm just a member in .NET trying to help). That's all.
No probs. How did you want to help? Do you know a workaround or you could help to fix it? BTW: I did not tell you said it shouldn't be fixed :) Just added that nevertheless it should be, as I believe, so, no worry. I think it was misunderstanding.
This is also posing an issue in my migration to using MacCatalyst. It seems kinda important that a core control does not work in an extremely common use case.
Hey! Is there update on this one? Thanks!
This issue is a complicated one, as this is fundamentally an iOS/MacCatalyst issue. Pickers are modal and you can only have one modal displayed at one time. There are controls available via MacCatalyst, but MAUI would have to create a new XPlat picker/impl for it.
I doubt this is getting fixed for .NET 9.
This issue is a complicated one, as this is fundamentally an iOS/MacCatalyst issue. Pickers are
modaland you can only have onemodaldisplayed at one time. There are controls available via MacCatalyst, but MAUI would have to create a new XPlat picker/impl for it.I doubt this is getting fixed for .NET 9.
Thank you for your reply! Well, then, we will have to use modals instead of pickers, as modals over modals work well. The only thing - it takes more time to set it up and some extra code, but this is the only solution I found for the issue.
I hope next round, say, on .Net 10 we will see this working well :)