mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Autofocus old and new error messages
Previously all our error messages had the class `error-message`. Where we are using the components from GOV.UK Frontend they have the class `govuk-error-message`. This makes the code which jumps focus to the first error work in both cases.
This commit is contained in:
@@ -17,7 +17,7 @@ showHideContent.init();
|
||||
|
||||
$(() => GOVUK.modules.start());
|
||||
|
||||
$(() => $('.error-message').eq(0).parent('label').next('input').trigger('focus'));
|
||||
$(() => $('.error-message, .govuk-error-message').eq(0).parent('label').next('input').trigger('focus'));
|
||||
|
||||
$(() => $('.banner-dangerous').eq(0).trigger('focus'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user