focus sur le mot de passe lorsqu'on traite les suggestions

This commit is contained in:
clemkeirua 2019-12-03 10:05:26 +01:00 committed by Pierre de La Morinerie
parent 8cab6ae19f
commit 841b00bafe

View file

@ -2,6 +2,7 @@ import { delegate, show, hide } from '@utils';
import { suggest } from 'email-butler';
const userNewEmailSelector = '#new_user input#user_email';
const passwordFieldSelector = '#new_user input#user_password';
const suggestionsSelector = '.suspect-email';
const emailSuggestionSelector = '.suspect-email .email-suggestion-address';
@ -26,6 +27,7 @@ export function acceptEmailSuggestion() {
userEmailInput.value = suggestedEmailSpan.innerHTML;
hide(document.querySelector(suggestionsSelector));
document.querySelector(passwordFieldSelector).focus();
}
export function discardEmailSuggestionBox() {