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

PINCodeInput: Fixes paste on Firefox #94

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

corbanbrook
Copy link
Collaborator

onPaste and onChange were conflicting which each other on Firefox. When a paste occurred the onChange event would fire and override the value set by the paste due to the order of the events. On Chrome the onChange event didn't occur because the prop change happens before the onChange event. Since we are using a controlled input setting the value via props the fix was to simply preventDefault on paste and update the value prop.

@corbanbrook corbanbrook merged commit d0dc3f0 into master Dec 3, 2024
1 check passed
@corbanbrook corbanbrook deleted the fix-pin-code-input-paste branch December 3, 2024 16:56
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

Successfully merging this pull request may close these issues.

1 participant