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

ComboBox does not loose focus after selection #17975

Open
apman opened this issue Jan 14, 2025 · 0 comments
Open

ComboBox does not loose focus after selection #17975

apman opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@apman
Copy link

apman commented Jan 14, 2025

Describe the bug

When using the mouse or trackpad to make a selection from a ComboBox, it remains active and responds to scroll events even after the Popup of options has closed. (I guess this is what you'd would want for keyboard navigation, but when using a mouse it is quite unexpected and can easily lead to accidental input changes.)

To Reproduce

  • Create a simple ComboBox:

     <ComboBox SelectedIndex="0">
          <ComboBoxItem>Option 1</ComboBoxItem>
          <ComboBoxItem>Option 2</ComboBoxItem>
          <ComboBoxItem>Option 3</ComboBoxItem>
          <ComboBoxItem>Option 4</ComboBoxItem>
     </ComboBox>
  • Click on the ComboBox, and click again to select any option

  • Move the mouse pointer back over the closed ComboBox and scroll with your mouse wheel / two fingers on trackpad

➡️ The selected option changes as you scroll:

ComboBox_bug

Expected behavior

The control should no longer respond to mouse actions once the Popup has closed.

Avalonia version

11.2.3

OS

No response

Additional context

While rolling the mouse wheel over a closed control might seem contrived, small accidental scrolls can happen quite easily with devices like Apple's Magic Mouse, or in the context of a larger form where you'd make your selection and quickly scroll to the next ... (cp. #13751 which sounds like it might be related to this issue)

@apman apman added the bug label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant