uNmAnNeR / imaskjs

vanilla javascript input mask
https://imask.js.org
MIT License
4.96k stars 258 forks source link

onAccept event are not fired in version 7 when autocomplete by browser #1082

Open bezuglyyvlad opened 1 month ago

bezuglyyvlad commented 1 month ago

Describe the bug Upgraded the package from 6. to 7., and the onAccept and event are not fired. We use React with react-imask and autocomplete for input element.

To Reproduce STR:

  1. Add input with mask (use IMaskInput)
  2. Set mask for example - '00000'
  3. Add autocomplete attribute for input - 'postal-code'
  4. Set autocomplete data (need postal-code data) in browser (example of desktop settings - chrome://settings/addresses)
  5. Enter data in input using autocomplete

CodeSandbox

Expected behavior onAccept fired on IOS Chrome when autocomplete by browser

Environment:

Additional context related closed PR: https://github.com/uNmAnNeR/imaskjs/issues/1047

SOjuD commented 1 month ago

faced with the same issue additional information

mauribuffa commented 1 month ago

I’m running into the same issue with the warning Element value was changed outside of mask. Synchronize mask using mask.updateValue() to work properly.

zacronos commented 3 weeks ago

Although I haven't confirmed (I don't have an iPhone to use for deeper troubleshooting), I believe this issue may be the source of a problem my users are seeing, where autocomplete entry isn't working correctly in Chrome on iPhone for our app. Our Customer Support team has confirmed the problem, with video capture. In this case, the autocompleted input seems to disappear on blur.

It works fine in Chrome/Android, and even Chrome on iOS on a MacBook Pro. It only appears to be a problem (for us at least) on Chrome/iPhone.

I've had to resort to the autocomplete="one-time-code" hack to disable autocomplete across the board to avoid this issue.

YauheniAndryieuski commented 3 weeks ago

Hi @uNmAnNeR ! It would be great to have this issue fixed 🙏 , because currently we are forced to use the 6.* version, since it doesn't have this bug.