1

I faced a very tiny issue when using Edge.

<input type="number" value="5" step="1" min="1">

$("input").on("input", function(event) {
  alert(event.type);
})

when I use keys (up/down) to change the value - event is triggered in Chrome/FF but not in Edge therefore I am considering to use 2 events instead: keyup mouseup but I do not really like it.

Here is an example (but the issue is only reproduced in Edge): https://jsfiddle.net/ds33ux75/5/

Is there any better way to catch value change in field live?

Dmytro Pastovenskyi
  • 5,240
  • 5
  • 37
  • 56
  • 1
    It's a known Edge bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10242461/ – cjs1978 May 31 '18 at 09:36
  • @cjs1978 thanks, I have just found the article too. So using 'input' event is OK actually. – Dmytro Pastovenskyi May 31 '18 at 09:38
  • Found this: https://stackoverflow.com/questions/3940258/what-events-does-an-input-type-number-fire-when-its-value-is-changed - it seems that neither "input" or "change" fires in Edge when using arrow keys. – cjs1978 May 31 '18 at 09:39

0 Answers0