Skip to content

Commit

Permalink
fix: prevent automatic blurring on submit
Browse files Browse the repository at this point in the history
  • Loading branch information
samh-nl committed Aug 1, 2023
1 parent 89dfb77 commit 65014c0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/components/MagicCodeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ function MagicCodeInput(props) {
if (!props.shouldSubmitOnComplete || _.filter(numbers, (n) => ValidationUtils.isNumeric(n)).length !== props.maxLength || props.network.isOffline) {
return;
}
// Blurs the input and removes focus from the last input and, if it should submit
// on complete, it will call the onFulfill callback.
blurMagicCodeInput();
props.onFulfill(props.value);
};

Expand Down
3 changes: 0 additions & 3 deletions src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ function BaseValidateCodeForm(props) {
return;
}
} else {
if (inputValidateCodeRef.current) {
inputValidateCodeRef.current.blur();
}
if (!validateCode.trim()) {
setFormError({validateCode: 'validateCodeForm.error.pleaseFillMagicCode'});
return;
Expand Down

0 comments on commit 65014c0

Please sign in to comment.