Skip to content

[BUG] Picker view on MacCatalyst not responding to user input when added to a Popup #1728

Closed

Description

@Rabidgoalie

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

A Picker view that has been added to a Popup doesn't respond to any user interaction on MacOS. Clicking on the picker does nothing, regardless of how the picker's ItemsSource is populated. The data source can be in the code-behind, bound to data in a view model, or defined in XAML. It makes no difference; the user can click on the picker and nothing will happen.

This behavior is not seen when a Picker view is added to the main page of the same project, with it's items source being defined in XAML.

Expected Behavior

When the popup is displayed, and the picker is clicked on, the picker should display a list of options for the user to select from.

Steps To Reproduce

  1. Open and run the solution from the reproduction repository.
  2. Observe that the Picker on the main page is working as expected, by clicking on it to view it's list of options to choose from.
  3. Click the button labeled "Show Popup" to display the popup.
  4. Click on the picker view on the popup, which doesn't display a list of options to choose from.

Link to public reproduction project repository

https://github.com/Rabidgoalie/ToolkitPickerPopupIssue

Environment

- .NET MAUI CommunityToolkit: 7.0.1
- OS: MacOS Sonoma 14.3.1
- .NET MAUI: 8.0 (version used by the app template)
- Test Device: Mac Mini M1
- Xcode version: 15.2
- VSCode version: 1.87.0 (Universal)
- CommunityToolkit.Mvvm version: 8.2.2
- iOS Simulator: iPhone 15
- Build configurations tested: Debug and Release

Anything else?

The reproduction repo has code to test the ItemsSource initialization using code-behind, XAML definition, and data-binding to a view model. This can be done by commenting/uncommenting the relevant code, and each approach was tested to ensure the Picker's ItemsSource was not null.

I encountered this issue in an app that I am working on, named CornellPad. In CornellPad, the picker has a command that is called via toolkit:EventToCommandBehavior when the picker's SelectedIndexChanged event is fired. To bypass the event-to-command calls, hoping that this might have been an issue, I created the SelectedIndexChanged event handler in the code-behind for the popup (which is found at CornellPad/Popups/CreateTopicPopup.xaml just in case someone wants to take a look, which I doubt due to the projects size). No matter how this event is handled, it is never called, which isn't a surprise since the selected index never changes. This information is being provided to illustrate that no event that I was handling was ever fired for a Picker that is added to a Popup when on MacCatalyst. No matter what, the Picker seems completely unresponsive on this platform.

I don't know what the behavior for this would be when using .NET MAUI 7 on MacCatalyst, because I was having issues getting any popups to display on that version. This was true for CornellPad as well as a separate repo that I created to issue a bug report (upgrading that sample app to .NET MAUI 8 solved the issue, so no bug report was needed). I can only get a popup to display on the main page of an app when using .NET MAUI 8.

Activity

  1. maestro-oc commented on May 16, 2024

    @maestro-oc

    We are experiencing the same issue, has anyone looked into this yet?

  2. fit4you-bike commented on Jul 16, 2024

    @fit4you-bike

    Same issue:
    .NET MAUI CommunityToolkit: 9.0.2

    • OS: MacOS Sonoma 14.7
    • .NET MAUI: 8.0 all packages updated
    • Test Device: Mac Mini i7
    • Xcode version: 15.4
    • Build configurations tested: Debug and Release

    Note: no issues on iOS on iPad. Only MacOS

  3. vhugogarcia commented on Jul 25, 2024

    @vhugogarcia
    Contributor

    Hello @fit4you-bike and @fit4you-bike, the sample project repository shared on the issue is not available anymore. I'm not sure it was marked as private access only. Could any of you share a new code sample reproducing the issue? please

    Thanks in advance.

  4. dotnet-policy-service commented on Jul 25, 2024

    @dotnet-policy-service
    Contributor

    Hi @Rabidgoalie. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 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.

  5. dotnet-policy-service commented on Jul 29, 2024

    @dotnet-policy-service
    Contributor

    This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 2 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

  6. Rabidgoalie commented on Jul 29, 2024

    @Rabidgoalie
    Author

    This should not have been labeled "needs reproduction", as I provided a reproduction repo link. That label should be removed.

    EDIT: I apologize. I didn't realize that the reproduction repo got set to private...I didn't set it to private, and I am positive that I set it to public when I posted this. I have since went into the repo and set it to public.

  7. vhugogarcia commented on Jul 29, 2024

    @vhugogarcia
    Contributor

    Thanks @Rabidgoalie for updating the permissions on the repository sample showing the issue. We were able to reproduce the issue in our side. We are still not sure if this is an issue of the toolkit, .NET MAUI or MacCatalyst limitation. We will require more time to investigate. If you have some insights will be fantastic, please share those with us.

  8. locked and limited conversation to collaborators on May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/viewsIssue/Discussion/PR that has to do with ViewsbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions