Open MitchBomcanhao opened 2 years ago
Additional information - this only appears to be an issue when you've focused the picker before (by picking something). Pickers that haven't been interacted with do not get changed when using the mouse wheel. If you pick something and then click away from the picker, the issue is not reproducible.
We have the same issue and would appreciate a solution :-)
I have same problem here in .NET MAUI windows platform, and i fixed it with this code below. Maybe you can try this too
in xaml.cs:
public async void OnPickerSelectedIndexChanged(object sender, EventArgs e)
{
var picker = (Picker)sender;
// add this code
await picker.CaptureAsync();
picker.Unfocus();
// -----
}
in xaml:
<Picker ItemsSource="{Binding PrintFileType}"
ItemDisplayBinding="{Binding Name}"
SelectedIndexChanged="OnPickerSelectedIndexChanged" />
Description
I've got a vertically scrollable page with picker controls. On UWP (haven't tried other operating systems' mouse support), the picker control will capture the mouse scroll wheel command, allowing the user to change the selected value without opening the picker dialog. This means that people are very likely to unknowingly change the selected value on pickers, when (for example) attempting to scroll down the page using the mouse wheel.
specific scenarios:
Steps to Reproduce
Expected Behavior
The picker shouldn't change its value without the user specifically interacting with it.
Actual Behavior
The picker value can be changed without the user's knowledge. The picker will capture the mouse input and can stop page scrolling.
Basic Information
Screenshots
Note: the screen capture doesn't show the picker popup when I initially select a value - just an issue with the recording.
Reproduction Link
Use this as your page content.
Workaround
None found so far.