-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-controls-pickerPickerPickermigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertplatform/androids/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
Pickers reopen after selecting an item that's already selected. Easy to observe with a picker with only one item.
I suspect the problem comes from the code that reopens the picker on focus change: https://github.com/dotnet/maui/blob/main/src/Core/src/Handlers/Picker/PickerHandler.Android.cs#L94
Steps to Reproduce
- Make a new MAUI project
- Add some pickers to the page. Having multiple ones seems to exacerbate the issue. Also having ones with only one item.
- Tap on the pickers and re-select the selected item
- Observe the pickers reopen after selection
Link to public reproduction project repository
https://github.com/mfeingol/repros/tree/master/PickerFocusRepro
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
A workaround is to do this:
class CustomPicker : Picker
{
public CustomPicker()
{
// Maui: work around https://github.com/dotnet/maui/issues/15394
this.Focused += (s, e) => this.Unfocus();
}
}Relevant log output
No response
Ahmed-Hassan-GWS and BlueRaja
Metadata
Metadata
Assignees
Labels
area-controls-pickerPickerPickermigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertplatform/androids/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working