Skip to content
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

[Bug][Android]The IsEnable property of the Picker does not work #18035

Open
BaY1251 opened this issue Oct 16, 2023 · 4 comments
Open

[Bug][Android]The IsEnable property of the Picker does not work #18035

BaY1251 opened this issue Oct 16, 2023 · 4 comments
Labels
area-controls-picker Picker migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 t/bug Something isn't working
Milestone

Comments

@BaY1251
Copy link

BaY1251 commented Oct 16, 2023

Description

Strange Picker behaviour when used in NavigationPage, After multiple calls to PushAsync,The IsEnable property of the Picker does not work,

  1. The Picker project selector automatically opens, even if it is disabled.
  2. A Picker item is selectable, even when IsEnabled is set to False.

This issue has been present since MAUI7 and has been replicated on the latest MAUI8-RC2.
This issue was reported on #2349 and inexplicably closed.

Picker

Steps to Reproduce

下载 https://github.com/BaY1251/MauiDebug.git
打开 /Picker/Picker.sln 编译生成工程.
在Android7.1下运行

  1. 点击 名称为"Navigate new page"的按钮
  2. 在新的界面再次点击"Navigate new page"按钮
  3. 点击返回的小箭头,界面回退后,Picker竟然自动展开了. 但是此时Picker无法通过点击选择子项
  4. 再次后退,Picker虽然不会自动展开 但是IsEnable属性失效了,竟然可以点击选择.当选择完成后,再次点击IsEnable属性又再次生效,无法点击

#translate

Download https://github.com/BaY1251/MauiDebug.git
Open/Ticker/Ticker.sln to compile and generate a project
Running under Android 7.1

  1. Click on the button named "Navigate new page"
  2. Click on the "Navigate new page" button again in the new interface
  3. Click on the small arrow to return, and after the interface recedes, the Picker unexpectedly expands automatically But at this point, Picker cannot select sub items by clicking
  4. Step back again. Although the Picker will not automatically expand, the IsEnable attribute is False and can be clicked to select. After the selection is completed, The IsEnable attribute takes effect and cannot be clicked

Link to public reproduction project repository

https://github.com/BaY1251/MauiDebug.git

Version with bug

8.0.6

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

Android7.1

Did you find any workaround?

The temporary solution is to set the Focusable to False

Relevant log output

No response

@BaY1251 BaY1251 added the t/bug Something isn't working label Oct 16, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Oct 16, 2023
@PureWeen PureWeen added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Oct 16, 2023
@PureWeen PureWeen added this to the Backlog milestone Oct 16, 2023
@ghost
Copy link

ghost commented Oct 16, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@axa88
Copy link

axa88 commented Oct 17, 2023

Ive observed similar behavior on Android, where it appears a random Picker has been forced to focus and activate in the same manner as show in this bug report.
This may happen as when a keyboard return is invoked, it can force focus to another control as stated.
Or as in this case a Page is navigated to and focus is given/forced to the first/only control, and activated if it happens to be a Picker

Im not yet aware how to control this focus/activate behavior.

@leoslima13
Copy link

This still happening on MAUI version 8.0.6
Any workaround on that one?

@BaY1251
Copy link
Author

BaY1251 commented Mar 11, 2024

The temporary solution is to set the Focusable to False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-picker Picker migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants