I think the behaviour you're describing is that a non-numeric value in a number field doesn't trigger the change event in JavaScript. I don't know if it would necessarily be a bug, but a difference in behaviour between Firefox and Chrome. In trying it with the JavaScript querySelector instead, it looks like Chrome restricts the input on keypress, whereas Firefox restricts it ahead of the change event. You could always use the keypress event, but looking at your snippet, it looks like you could just use the min and max attributes of the number field instead?