-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[MacOS] Fixed the picker items do not appear when tapping on the picker after navigating through PushModalAsync #28003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jfversluis
merged 6 commits into
dotnet:inflight/current
from
NanthiniMahalingam:fix-6101
Aug 25, 2025
+109
−2
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
326535e
Fixed the issue of picker displaying issue when using PushModalAsync …
NanthiniMahalingam 5ccf151
Added UI the test case.
NanthiniMahalingam aea96d5
Added the outputs for android and iOS platform
NanthiniMahalingam 7e05ccc
Updated the fix and added the output images
NanthiniMahalingam acf0700
Updated the code changes.
NanthiniMahalingam 71ed192
Updated the output image
NanthiniMahalingam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+14.1 KB
...s/snapshots/android/ShouldAppearItemsWhenTappingOnPickerUsingPushModalAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 6101, "Picker items do not appear when tapping on the picker while using PushModalAsync for navigation", PlatformAffected.macOS)] | ||
|
|
||
| public class Issue6101Shell : Shell | ||
| { | ||
| public Issue6101Shell() | ||
| { | ||
| FlyoutBehavior = FlyoutBehavior.Disabled; | ||
|
|
||
| ShellContent shellContent = new ShellContent | ||
| { | ||
| ContentTemplate = new DataTemplate(typeof(Issue6101)), | ||
| Route = "MainPage" | ||
| }; | ||
|
|
||
| Items.Add(shellContent); | ||
| } | ||
|
|
||
| public class Issue6101 : ContentPage | ||
| { | ||
| public Issue6101() | ||
| { | ||
| Content = new StackLayout | ||
| { | ||
| Children = | ||
| { | ||
| new Button | ||
| { | ||
| Text = "Navigate to page that opens modal", | ||
| AutomationId = "Button", | ||
| Command = new Command(() => Navigation.PushModalAsync(new Issue6101Page1())) | ||
| } | ||
| } | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| public class Issue6101Page1 : ContentPage | ||
| { | ||
| public Issue6101Page1() | ||
| { | ||
| Content = new VerticalStackLayout() | ||
| { | ||
| Children = | ||
| { | ||
| new Picker | ||
| { | ||
| AutomationId = "Picker", | ||
| ItemsSource = new List<string> { "Item 1", "Item 2", "Item 3" } , | ||
| SelectedIndex = 0, | ||
| } | ||
| } | ||
| }; | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Binary file added
BIN
+18.2 KB
...Tests/snapshots/mac/ShouldAppearItemsWhenTappingOnPickerUsingPushModalAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions
26
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue6101.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues | ||
| { | ||
| public class Issue6101 : _IssuesUITest | ||
| { | ||
| public override string Issue => "Picker items do not appear when tapping on the picker while using PushModalAsync for navigation"; | ||
|
|
||
| public Issue6101(TestDevice device) : base(device) | ||
| { | ||
| } | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Picker)] | ||
| public void ShouldAppearItemsWhenTappingOnPickerUsingPushModalAsync() | ||
| { | ||
| App.WaitForElement("Button"); | ||
| App.Tap("Button"); | ||
| App.WaitForElement("Picker"); | ||
| App.Click("Picker"); | ||
| VerifyScreenshot(); | ||
| } | ||
| } | ||
| } | ||
Binary file added
BIN
+4.37 KB
...s/snapshots/windows/ShouldAppearItemsWhenTappingOnPickerUsingPushModalAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+93 KB
...Tests/snapshots/ios/ShouldAppearItemsWhenTappingOnPickerUsingPushModalAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:

Could you commit the images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jsuarezruiz ,