Skip to content

Conversation

@NanthiniMahalingam
Copy link
Contributor

@NanthiniMahalingam NanthiniMahalingam commented Feb 24, 2025

Issue Detail

  • After navigating using PushModalAsync, picker items do not appear when tapping on the picker.

Root Cause:

  • The root view controller does not retrieve the proper UIController for the modal wrapper to present the picker controller. As a result, the picker does not display when tapped.

Description of Changes:

  • Retrieved the topmost modal wrapper view controller from RootViewController to correctly present the picker view controller.

Issues Fixed

Fixes #6101
Fixes #21470

Validated the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Output

Before After
6101_before.mov
6101_after.mov

@dotnet-policy-service
Copy link
Contributor

Hey there @NanthiniMahalingam! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Feb 24, 2025
@jsuarezruiz jsuarezruiz added platform/macos macOS / Mac Catalyst area-controls-picker Picker labels Feb 24, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

App.Tap("Button");
App.WaitForElement("Picker");
App.Click("Picker");
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending snapshots (Mac and Windows). Already available in the latest build.

Example:
image

Could you commit the images?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending snapshots (Mac and Windows). Already available in the latest build.

Example: image

Could you commit the images?

Hi @jsuarezruiz ,

  • Pending snapshots have been committed.

@NanthiniMahalingam NanthiniMahalingam marked this pull request as ready for review February 25, 2025 11:14
@NanthiniMahalingam NanthiniMahalingam requested a review from a team as a code owner February 25, 2025 11:14
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

uITextField.EditingDidEnd += editingDidEndHandler;

var platformWindow = MauiContext?.GetPlatformWindow();
var currentViewController = GetCurrentViewController(platformWindow?.RootViewController);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If platformWindow is null, the entire operation is unnecessary, so you can exit earlier to avoid unnecessary processing.

if (platformWindow == null) return;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If platformWindow is null, the entire operation is unnecessary, so you can exit earlier to avoid unnecessary processing.

if (platformWindow == null) return;

Hi @jsuarezruiz ,
I've added a null check for platformWindow to prevent unnecessary processing. Please review it.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NanthiniMahalingam NanthiniMahalingam changed the title Fixed the picker items do not appear when tapping on the picker after navigating through PushModalAsync [MacOS] Fixed the picker items do not appear when tapping on the picker after navigating through PushModalAsync Jun 18, 2025
@jfversluis
Copy link
Member

/rebase

Copilot AI review requested due to automatic review settings August 12, 2025 15:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jfversluis
Copy link
Member

jfversluis commented Aug 21, 2025

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis
Copy link
Member

/azp run MAUI-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis jfversluis added this to the .NET 9 SR12 milestone Aug 25, 2025
@jfversluis jfversluis changed the base branch from main to inflight/current August 25, 2025 12:22
@jfversluis jfversluis merged commit dc01945 into dotnet:inflight/current Aug 25, 2025
94 checks passed
PureWeen pushed a commit that referenced this pull request Sep 5, 2025
…navigation (#28003)

Added UI the test case.

Added the outputs for android and iOS platform

Updated the fix and added the output images

Updated the code changes.

Updated the output image
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-picker Picker community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/macos macOS / Mac Catalyst

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Picker() on Mac Catalyst does not display dialog with items Picker doesn't show options in modal

3 participants