imaskjs icon indicating copy to clipboard operation
imaskjs copied to clipboard

onAccept is called 2 times when simultaneously updating value and mask

Open bezuglyyvlad opened this issue 10 months ago • 2 comments

Describe the bug When simultaneously updating the value and mask and passing them to IMaskInput onAccept is called 2 times

  1. With new mask and old value
  2. With new mask and new value

To Reproduce STR:

  1. Add input with mask (use IMaskInput)
  2. Pass to IMaskInput value and mask
  3. Simultaneously change value and mask
  4. Check mask value in onAccept

CodeSandbox

Expected behavior onAccept is triggered once with a new value and mask

Environment:

  • OS: MacOS
  • Browser chrome
  • Version 132.0.6834.162
  • IMask version 6.6.3
  • React 18.0.0

Additional context Problem also reproduced on IMask version 7.6.1

bezuglyyvlad avatar Feb 20 '25 12:02 bezuglyyvlad

faced the same problem

DenisKenzo avatar Feb 20 '25 12:02 DenisKenzo

+1

iamlepin avatar Feb 20 '25 14:02 iamlepin