w3c / input-events

Input Events
https://w3c.github.io/input-events/
Other
24 stars 16 forks source link

Declare inputType value of increating/decreasing its value with key operation and pressing spin buttons #88

Open masayuki-nakano opened 5 years ago

masayuki-nakano commented 5 years ago

<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.

rniwa commented 5 years ago

This is an interesting point given we're discussing a similar feature / input type for AOM: https://wicg.github.io/aom/spec/input-events.html#type-action-increment

@alice @cookiecrook @hobor @whsieh