[numberField] add option to disable increment/decrement on scroll
🙋 Feature Request
It would be nice to have an option to disable increment/decrement on scroll for numberfield. There are many cases where these inputs are used for sensitive data like prices, percentages, etc., and when you have many number fields vertically stacked it's too easy to mess up (while scrolling). (Speaking from our own use case)
Apparently Chrome's native number field only allows scrolling to adjust the value when focused. https://twitter.com/pipopeperoni/status/1362294961849384962?s=21 This makes a lot of sense to me. We could also have an option to disable it completely but I bet this would solve it by default for a lot of cases.
I think it would be good to add an option to disable in/decrementing on scroll. If a focused NumberField scrolls into the cursor location, the user may end up accidentally in/decrementing the value.
Hey! Since this was noted above, have you run into an issue where this is actually happening? We don't want to necessarily add this to the API if it doesn't solve a present problem and would cause it to no longer match the native behavior as it currently does. That's not saying we wouldn't consider it, just that we'd consider it carefully.
Hey! Since this was noted above, have you run into an issue where this is actually happening? We don't want to necessarily add this to the API if it doesn't solve a present problem and would cause it to no longer match the native behavior as it currently does. That's not saying we wouldn't consider it, just that we'd consider it carefully.
Yes, a customer reported the issue to us. If it won't be added to the API, is there any way to override the behaviour? I tried overriding onScroll and onScrollCapture on the DOM element with an empty function to no avail.