ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.53k stars 13.52k forks source link

feat: ion-picker mouse scroll control #29463

Open nelunull22123 opened 3 weeks ago

nelunull22123 commented 3 weeks ago

Prerequisites

Describe the Feature Request

I want a setting to prevent scrolling of many lines Nowadays, selecting with the mouse wheel is almost impossible

Describe the Use Case

The problem is that when using the mouse wheel, it is very difficult to select elements. They scroll across several lines at once and very quickly. It is necessary to prohibit or somehow limit the scrolling of elements (it is important to make this optional).

chrome_4VGycGpKPT

Describe Preferred Solution

I think we need to add an option, when enabled, when scrolling, only the closest element will be selected and there will be a delay (for example, 300ms) and only after that the next element will be selected

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

sean-perkins commented 2 weeks ago

@nelunull22123 what is your scroll speed set to?

With the fastest speed enabled in MacOS settings I am still able to intentionally scroll to any option within the list with high precision:

CleanShot 2024-05-08 at 13 39 41@2x

It is difficult to tell from the recording provided in the issue if the scrolling is exaggerated when you are scrolling from the top and bottom repeatedly. I am using a logitech mouse with a mouse wheel:

https://github.com/ionic-team/ionic-framework/assets/13732623/5b6d74f0-c958-4c0e-982a-65a71481f589

CSS scroll snapping (the underlying implementation) does not allow for adjusting the scrolling speed and easing of the interaction.

nelunull22123 commented 2 weeks ago

@sean-perkins sean-perkins

I have a Logitech mouse. In Windows, scrolling is set to 3 lines (by default).| image