Closed razh closed 6 years ago
Thanks for the detailed ticket @razh! I'll take a look into this.
@ten1seven No worries, we decided to go another route on this that appears to work. I'm aware of at least Firefox on Windows and Linux exhibiting this behavior even without the .addEventListener('wheel')
.
For future reference, we used jquery-mousewheel to normalize scroll distances and added it to scrollTop
in the mousewheel
event listener instead of blurring.
Feel free to close this!
An unfortunate side-effect of adding a
wheel
event listener is that it triggers undesirable scrolling behavior forinput[type="number"]
elements in Chrome and Safari on macOS:This only occurs when a
wheel
event listener is added and it occurs regardless of where in the document it's added. For example, theseinput[type="number"]
events don't have this behavior:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
Currently, the prevailing solution is to
blur
the input on themousewheel
event, but I would like to keep focus on the element:https://stackoverflow.com/questions/9712295/disable-scrolling-on-input-type-number
I don't know the full extent of how this behavior affects Windows and Linux.