Watch out! Chrome has a huge bug with <input type="number"> which causes values to change unexpectedly.
It's fixed in Chrome 150, but that won't land until the end of June.
Watch out! Chrome has a huge bug with <input type="number"> which causes values to change unexpectedly.
It's fixed in Chrome 150, but that won't land until the end of June.
The 'fixed' behaviour in Chrome 150 is screwy too:
Default: mouse wheel doesn't change the input value. Allows scrolling.
If there's a non-passive 'wheel' listener on any parent: wheel does change the value. Prevents scrolling.
If there's a passive listener: The bug returns.
Yesssss @bramus got the fix merged into Chrome 149, which rolls out next week.
The bug's still there if you have a passive "wheel" listener on any parent, but hopefully that's less common. https://issues.chromium.org/issues/516844151