You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description
I encountered and unexpected behavior with several custom Inputs using react-imasked. When attempting to paste a value without a mask, the onChange callback fails to trigger.
I have created a CodePen demo to illustrate this issue:
Initially, I attempted to address this by adding an onPaste event to invoke the same onChange method callback. However, this approach resulted in an empty value being returned:
To resolve this, I implemented a workaround using setTimeout, which successfully achieved the expected behavior:
Despite its effectiveness, the setTimeout solution is not ideal. I am reaching out to address this issue and inquire if there is a better way to resolve it. Thank you for your assistance!
Bug Description
I encountered and unexpected behavior with several custom Inputs using
react-imasked
. When attempting to paste a value without a mask, theonChange
callback fails to trigger.I have created a CodePen demo to illustrate this issue:
View Demo
Initially, I attempted to address this by adding an
onPaste
event to invoke the sameonChange
method callback. However, this approach resulted in an empty value being returned:To resolve this, I implemented a workaround using
setTimeout
, which successfully achieved the expected behavior:Despite its effectiveness, the
setTimeout
solution is not ideal. I am reaching out to address this issue and inquire if there is a better way to resolve it. Thank you for your assistance!Steps to Reproduce
Codepen Demo
Expected Behavior
The
onChange
event should trigger when pasting a value without a mask.Environment:
Additional Context
Include any additional relevant information about the problem here.
The text was updated successfully, but these errors were encountered: