Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bezuglyyvlad opened this issue Oct 12, 2024 · 5 comments
Open

Comments

@bezuglyyvlad
Copy link

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:

  • OS: IOS
  • Browser chrome
  • Version 129.0.6668.69
  • IMask version 7.6.1
  • React 18.0.0

Additional context
related closed PR: #1047

@SOjuD
Copy link

SOjuD commented Oct 16, 2024

faced with the same issue
additional information

  • in console we have notifiacation Element value was changed outside of mask. Syncronize mask using mask.updateValue() to work properly.
  • mask.updateValue() on blur does not work
  • mask.updateValue() on input does not work
  • mask.displayValue has empty string (in my case initial value)
  • value, unmaskedValue also contains empty string

@mauribuffa
Copy link

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
Copy link

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
Copy link

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.

@vctormb
Copy link

vctormb commented Dec 12, 2024

I'm having the same problem with the autofill in mobile browsers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants