Merge pull request #4660 from betagouv/fix-autocorrect-exception
sign_up: fix suggestions error when navigating away
This commit is contained in:
commit
71a3e464b4
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ delegate('focusout', userNewEmailSelector, () => {
|
|||
const suggestedEmailSpan = document.querySelector(emailSuggestionSelector);
|
||||
|
||||
const suggestion = suggest(userEmailInput.value);
|
||||
if (suggestion && suggestion.full) {
|
||||
if (suggestion && suggestion.full && suggestedEmailSpan) {
|
||||
suggestedEmailSpan.innerHTML = suggestion.full;
|
||||
show(document.querySelector(suggestionsSelector));
|
||||
} else {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
= f.label :email, "Email"
|
||||
= f.text_field :email, autofocus: true, placeholder: "Votre adresse email"
|
||||
|
||||
.suspect-email
|
||||
.suspect-email.hidden
|
||||
.email-suggestion-title
|
||||
Voulez-vous dire
|
||||
%span.email-suggestion-address blabla@gmail.com
|
||||
|
|
Loading…
Reference in a new issue