I've noticed that HTML number fields change value when the mouse scrolls within the field. I would like to disable this (ideally without JS). I've found this Disable scrolling on `<input type=number>` but again I would like to accomplish this without any JS. Is there an HTML tag or setting I can use to disable this functionality? Ideally I would like to keep the field as a number
as well. Thanks for your help.
Asked
Active
Viewed 1,307 times
1
-
That is native behaviour, and in many cases taking away native behaviour is bad... – Niet the Dark Absol Jul 07 '14 at 14:54
-
Duplicate question: http://stackoverflow.com/a/7571867/1045794 – redditor Jul 07 '14 at 14:54
-
Again, I would like to accomplish this without any JS/Jquery. – apardes Jul 07 '14 at 14:57
-
1I'm afraid the only way to do this without javascript would be to make it a text field and not a number field. – Duncan Cowan Jul 07 '14 at 14:58
-
1You cannot do that without JS, so I closed as a dupe. – kapa Jul 07 '14 at 17:27