3 ms·
This advice is incorrect to recommend using type="number". On a desktop, trackpad and mousewheel scrolling while the pointer is hovering over and/or focus is wi
by floatingatoll 8y ago
This advice is incorrect to recommend using type="number". On a desktop, trackpad and mousewheel scrolling while the pointer is hovering over and/or focus is within a type="number" field will alter the number within it, resulting in undetected data errors as digits off-by-one without user awareness.
- shabbyrobe 8y agoAlso, things might get a bit weird when you enter this 16-digit... uhh... "invoice number": 9007199254740992.
- PetahNZ 8y agoNot sure if its just me, but I tried it and the mouse wheel does not cause the numbers to change, either focused or not. (latest chrome on mac)
- deleted 8y ago[deleted]
- mbel 8y agoFirefox on Windows does this when control is in focus and the mouse cursor is over the control.
- gbaygon 8y agoyour comment is spot on, here is a recent relevant article in HN about it: https://news.ycombinator.com/item?id=19479464 https://news.ycombinator.com/item?id=19479464
- Angostura 8y agoNot seeing this behaviour in Safari or Chrome Mac - whwere are you seeing it?
- floatingatoll 8y agohttps://news.ycombinator.com/item?id=19479464 https://news.ycombinator.com/item?id=19479464
- hibbelig 8y agoThe article mentions this problem near the end, and the component they built provides a solution.