I have bank card form with expiry that has MM/YY mask. Due to that, I have to specify maxlength=5 for browser to understand that my format is not default YYYY/MM. Here is the discussion about this feature.
Given that saved expiry value is 10/2030, when I try to use autocomplete in chrome on desktop, field is filled correctly as 10/30. But chrome mobile fills input as 10/20. That happens because, for some reason, inputmask removes attribute maxlength from masked inputs in mobile browsers (in this line).
Repro in which input is filled correctly on desktop but is failed to do so on mobile: https://jsfiddle.net/lazyfellow/r8cqwz51/8/. It's sufficient to turn on mobile view (device toolbar) on chrome desktop to get invalid behavior.
I have bank card form with expiry that has
MM/YY
mask. Due to that, I have to specifymaxlength=5
for browser to understand that my format is not defaultYYYY/MM
. Here is the discussion about this feature.Given that saved expiry value is
10/2030
, when I try to use autocomplete in chrome on desktop, field is filled correctly as10/30
. But chrome mobile fills input as10/20
. That happens because, for some reason,inputmask
removes attributemaxlength
from masked inputs in mobile browsers (in this line).