<input type="number"> is a special form control for InputEvent. Currently, InputEvent interface is declared as used for text input controls. <input type="number"> typically has editor but also has spin buttons and they are usable with ArrowDown key and ArrowUp key. Now, all browsers which support InputEvent dispatch input events with Event interface. And nobody dispatches beforeinput event for these operations.
I believe that input event should be dispatched with InputEvent interface, and beforeinput event should be dispatched as cancelable event. Additionally, the inputType value should be defined (perhaps, insertReplacementText? Because the value comes from built-in UI like autocomplete.
<input type="number">
is a special form control forInputEvent
. Currently,InputEvent
interface is declared as used for text input controls.<input type="number">
typically has editor but also has spin buttons and they are usable withArrowDown
key andArrowUp
key. Now, all browsers which supportInputEvent
dispatchinput
events withEvent
interface. And nobody dispatchesbeforeinput
event for these operations.I believe that
input
event should be dispatched withInputEvent
interface, andbeforeinput
event should be dispatched as cancelable event. Additionally, theinputType
value should be defined (perhaps,insertReplacementText
? Because the value comes from built-in UI like autocomplete.