mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-23 09:29:14 -04:00
Fix the autofocus component
Since moving textboxes to GOV.UK Frontend we’ve started putting the data attribute on the `input` element itself, not a wrapper around it. This commit updates the Javascript accordingly.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
// is still where users intend to start
|
||||
if (($(window).scrollTop() > 0) && !forceFocus) { return; }
|
||||
|
||||
$('input, textarea, select', component).eq(0).trigger('focus');
|
||||
$(component).filter('input, textarea, select').eq(0).trigger('focus');
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user