w3c / input-events

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

inputType on safari mobile is undefined #140

Closed wobsoriano closed 1 year ago

wobsoriano commented 1 year ago

I'm on iOS 16 and event.inputType on Safari is undefined. Safari on iOS emits a CustomEvent instead of an InputEvent. I have tried it on Chrome, Firefox, and Opera and they all emit an InputEvent.

const input = document.querySelector('input[type="number"]');
input.addEventListener('input', logInputType);

function logInputType(event) {
  console.log(`Input type: ${event.inputType}`) // undefined
}
karlcow commented 1 year ago

@wobsoriano Not sure this is for the spec here. Probably https://bugs.webkit.org/show_bug.cgi?id=217693

wobsoriano commented 1 year ago

@wobsoriano Not sure this is for the spec here.

Probably https://bugs.webkit.org/show_bug.cgi?id=217693

That's definitely it! Thank you for pointing me to the right direction.