diff --git a/.changeset/tall-roses-invent.md b/.changeset/tall-roses-invent.md new file mode 100644 index 00000000000..20086b03a8c --- /dev/null +++ b/.changeset/tall-roses-invent.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Make the instant password field focusable if it is autofilled. diff --git a/packages/clerk-js/src/ui.retheme/components/SignIn/SignInStart.tsx b/packages/clerk-js/src/ui.retheme/components/SignIn/SignInStart.tsx index f75bbba8b56..44eb5314ab2 100644 --- a/packages/clerk-js/src/ui.retheme/components/SignIn/SignInStart.tsx +++ b/packages/clerk-js/src/ui.retheme/components/SignIn/SignInStart.tsx @@ -341,6 +341,7 @@ export function _SignInStart(): JSX.Element { const InstantPasswordRow = ({ field }: { field?: FormControlState<'password'> }) => { const [autofilled, setAutofilled] = useState(false); const ref = useRef(null); + const show = !!(autofilled || field?.value); // show password if it's autofilled by the browser useLayoutEffect(() => { @@ -373,14 +374,12 @@ const InstantPasswordRow = ({ field }: { field?: FormControlState<'password'> }) return ( ); diff --git a/packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx b/packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx index f75bbba8b56..44eb5314ab2 100644 --- a/packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx +++ b/packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx @@ -341,6 +341,7 @@ export function _SignInStart(): JSX.Element { const InstantPasswordRow = ({ field }: { field?: FormControlState<'password'> }) => { const [autofilled, setAutofilled] = useState(false); const ref = useRef(null); + const show = !!(autofilled || field?.value); // show password if it's autofilled by the browser useLayoutEffect(() => { @@ -373,14 +374,12 @@ const InstantPasswordRow = ({ field }: { field?: FormControlState<'password'> }) return ( );