Skip to content

Commit 735ec47

Browse files
authored
fix(login): resolve stuck transition when switching login forms (#2779)
1 parent be57997 commit 735ec47

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

src/components/Login/index.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,24 +201,17 @@ const Login = () => {
201201
<CSSTransition
202202
key={mediaServerLogin ? 'ms' : 'local'}
203203
nodeRef={loginRef}
204-
addEndListener={(done) => {
205-
loginRef.current?.addEventListener(
206-
'transitionend',
207-
done,
208-
false
209-
);
210-
}}
204+
timeout={{ enter: 300, exit: 150 }}
211205
onEntered={() => {
212206
document
213207
.querySelector<HTMLInputElement>('#email, #username')
214208
?.focus();
215209
}}
216210
classNames={{
217-
appear: 'opacity-0',
218-
appearActive: 'transition-opacity duration-500 opacity-100',
219211
enter: 'opacity-0',
220-
enterActive: 'transition-opacity duration-500 opacity-100',
221-
exitActive: 'transition-opacity duration-0 opacity-0',
212+
enterActive: 'transition-opacity duration-300 opacity-100',
213+
exit: 'opacity-100',
214+
exitActive: 'transition-opacity duration-150 opacity-0',
222215
}}
223216
>
224217
<div ref={loginRef} className="button-container">

0 commit comments

Comments
 (0)