event listeners

pull/760/head
Vincent 5 years ago
parent 2af2075b26
commit fb90617924

@ -40,8 +40,8 @@ export class SessionPasswordModal extends React.Component<Props, State> {
setTimeout(() => $('#password-modal-input').focus(), 100);
}
public componentDidMount() {
setTimeout(() => $('#password-modal-input').focus(), 100);
public componentWillUnmount() {
window.removeEventListener('keyup', this.onKeyUp);
}
public render() {

@ -35,6 +35,10 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> {
setTimeout(() => $('#password-prompt-input').focus(), 100);
}
public componentWillUnmount() {
window.removeEventListener('keyup', this.onKeyUp);
}
public render() {
const showResetElements =
this.state.errorCount >= window.CONSTANTS.MAX_LOGIN_TRIES;

Loading…
Cancel
Save