Skip to content

Commit

Permalink
reverts changes in #3762
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarpenter committed Jul 19, 2024
1 parent 09ad995 commit 978f04e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/elements/src/react/common/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,7 @@ const useInput = ({
const onFocus = React.useCallback(
(event: React.FocusEvent<HTMLInputElement>) => {
onFocusProp?.(event);
// Check for relatedTarget to avoid validating password when the input
// is programticallly focused after form submission. Avoids the issue
// where an error message would get removed and the success validation
// was shown immediately.
if (shouldValidatePassword && Boolean(event.relatedTarget)) {
if (shouldValidatePassword) {
validatePassword(event.target.value);
}
},
Expand Down

0 comments on commit 978f04e

Please sign in to comment.