Closed
Bug 949989
Opened 11 years ago
Closed 3 years ago
Make <input type=number> respond to the mouse wheel
Categories
(Core :: DOM: Forms, defect, P5)
Core
DOM: Forms
Tracking
()
RESOLVED
DUPLICATE
of bug 1261673
People
(Reporter: jwatt, Unassigned)
References
(Blocks 1 open bug)
Details
We should make <input type=number> respond to the mouse wheel.
Comment 1•11 years ago
|
||
Could you elaborate? do you mean it'll respond by changing the value when hovering
over it and mouse-wheel scrolling? or only when it has focus? or something else?
Reporter | ||
Comment 2•11 years ago
|
||
One of the two. I don't have a strong opinion of whether it should need to be focused or not. Will check other implementations in January.
Comment 3•11 years ago
|
||
I'm not sure it's a good idea to change the value for any kind of
mouse-wheel action, for the same reason as we don't do that for
<select>. It's just too easy to accidentally change the value
when you intend to scroll the page.
Comment 4•11 years ago
|
||
I agree with Mats. At least, only while <input> should have focus, it should handle wheel events. If <input> would handle wheel events during hovering, ESM needs to handle it with mouse wheel transaction system. It makes the implementation more complicated.
https://wiki.mozilla.org/Gecko:Mouse_Wheel_Scrolling#Mouse_wheel_transaction
Reporter | ||
Comment 5•11 years ago
|
||
I filed this because someone requested this feature (and I believe Chrome also implements this). I don't plan to work on it in the foreseeable future though since I have too many other things on my plate.
Comment 7•10 years ago
|
||
The duplicate I just marked had attachment 8440374 [details], which may or may not help when implementing this (I imagine the handlers will need to be redone in C++, but there we are...)
My reasoning in the duplicate was like this: I expect this because system number inputs on Windows and Linux respond to mouse wheel by changing value.
Regarding occasional change when you want to scroll the page instead, my example code only changes value when the input is focused and the pointer is over the input.
Reporter | ||
Updated•9 years ago
|
Priority: -- → P5
I have also made it into an addon https://addons.mozilla.org/de/firefox/addon/adjust-number-values-scroll/
Reporter | ||
Updated•6 years ago
|
Updated•4 years ago
|
Component: DOM: Core & HTML → DOM: Forms
This is fixed in:
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•