Projet

Général

Profil

0001-misc-do-not-focus-error-messages-in-form-preview-666.patch

Frédéric Péters, 11 juillet 2022 22:07

Télécharger (1009 octets)

Voir les différences:

Subject: [PATCH] misc: do not focus error messages in form preview (#66613)

 wcs/qommon/static/js/qommon.forms.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
wcs/qommon/static/js/qommon.forms.js
393 393
  add_js_behaviours($('form[data-live-url], form[data-backoffice-preview]'));
394 394

  
395 395
  // Form with error
396
  const errornotice = document.querySelector('form .errornotice');
396
  const errornotice = document.querySelector('form:not([data-backoffice-preview]) .errornotice');
397 397
  if (errornotice) {
398 398
    document.body.classList.add('form-with-error');
399 399
    errornotice.setAttribute('tabindex', '-1');
400
-