local commit

pull/760/head
Vincent 5 years ago
parent 215f6631a4
commit 2cd251a0e7

@ -33,6 +33,10 @@ export class SessionPasswordModal extends React.Component<Props, State> {
this.closeDialog = this.closeDialog.bind(this); this.closeDialog = this.closeDialog.bind(this);
} }
public componentDidMount() {
setTimeout(() => $('#password-modal-input').focus(), 100);
}
public render() { public render() {
const { action, onOk } = this.props; const { action, onOk } = this.props;
const placeholders = const placeholders =

@ -31,9 +31,13 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> {
window.addEventListener('keyup', this.onKeyUp); window.addEventListener('keyup', this.onKeyUp);
} }
public componentDidMount() {
setTimeout(() => $('#password-prompt-input').focus(), 100);
}
public render() { public render() {
const showResetElements = const showResetElements =
this.state.errorCount >= window.CONSTANTS.MAX_LOGIN_TRIES; this.state.errorCount >= window.CONSTANTS.MAX_LOGIN_TRIES;
const wrapperClass = this.state.clearDataView const wrapperClass = this.state.clearDataView
? 'clear-data-wrapper' ? 'clear-data-wrapper'
@ -56,7 +60,6 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> {
<input <input
id="password-prompt-input" id="password-prompt-input"
type="password" type="password"
autoFocus={true}
defaultValue="" defaultValue=""
placeholder={' '} placeholder={' '}
maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH}

Loading…
Cancel
Save