Skip to content

Conversation

@BRAUZER06
Copy link

@BRAUZER06 BRAUZER06 commented Dec 11, 2025

Changes:

  • Added an onMouseDown handler for ListItem
  • When clicking the middle mouse button inside the dropdown list, the event is prevented so that the page autoscroll is not triggered

Why:

  • In an open Select, clicking the middle mouse button inside the list area enabled the browser’s autoscroll, which caused the whole page to scroll with the dropdown open
  • Many UI libraries disable middle‑click autoscroll inside dropdown lists, so it was decided to remove this behavior here as well

How to test :

  1. Open a Select with a long list
  2. Click the middle mouse button inside the list area
  3. Verify that the page no longer starts autoscrolling and the dropdown remains open

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@BRAUZER06 BRAUZER06 requested a review from korvin89 as a code owner December 11, 2025 19:00
@BRAUZER06 BRAUZER06 marked this pull request as draft December 11, 2025 19:01
@BRAUZER06 BRAUZER06 marked this pull request as ready for review December 11, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant