Closed
Description
Describe the bug
ComboBox is not handling PointerPressed event causing unintended behavior on parent elements.
To Reproduce
Steps to reproduce the behavior:
- Create the sample as below
<Grid PointerPressed="InputElement_OnPointerPressed" PointerReleased="InputElement_OnPointerReleased">
<ComboBox>
<ComboBoxItem>Item1</ComboBoxItem>
<ComboBoxItem>item2</ComboBoxItem>
</ComboBox>
</Grid>
public partial class MainWindow : MetroWindow
{
public MainWindow()
{
InitializeComponent();
this.AttachDevTools();
}
private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e)
{
}
private void InputElement_OnPointerReleased(object? sender, PointerReleasedEventArgs e)
{
}
}
- Add breakpoints on the event handlers and run the sample
- Bug : EventHandler for PointerPressed event is invoked.
Expected behavior
In WPF both the MouseUp and MouseDown events are handled by the combobox. Therefore both these events should be handled by the combobox in Avalonia. Currently, only the PointerReleased event is handled.
Desktop (please complete the following information):
- OS: Windows 11
- Version 11 rc1.1