RobinHerbots/Inputmask

When autofilling, empty value in Firefox

alxAntipov opened this issue · 1 comments

  • When autofilling a form, in the input event target.value equals an empty string in the Firefox browser. For example, autofill in the Chrome browser generates 2 events: input and change. And the change event contains a filled string.
  • Reproduction where the input data is filled in correctly in other browsers, but fails to do so in Firefox: https://codepen.io/alxantipov/pen/BaEPEjM
  • OS: Mac OS/Window
  • Browser: Firefox
  • Inputmask 5.0.8

This is accepted behavior in Firefox since according to MDN,

Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.

This is true for any input field, even if it has no Inputmask.