mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-27 03:09:11 -04:00
Fix the focus handling on the scheduler
This got broken when we removed the old GOV.UK Selection Buttons
javascript in a592898eff
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
let focusSelected = function() {
|
||||
setTimeout(
|
||||
() => $('[type=radio]:checked').next('label').blur().trigger('focus').addClass('selected'),
|
||||
10
|
||||
50
|
||||
);
|
||||
};
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
let $component = $(component);
|
||||
let render = (state, data) => {
|
||||
$component.html(states[state].render(data));
|
||||
new GOVUK.SelectionButtons('.block-label input');
|
||||
};
|
||||
let choices = $('label', $component).toArray().map(function(element) {
|
||||
let $element = $(element);
|
||||
@@ -92,7 +91,7 @@
|
||||
),
|
||||
'name': name
|
||||
});
|
||||
$('.js-option').eq(0).parent('label').trigger('focus');
|
||||
focusSelected();
|
||||
|
||||
})
|
||||
.on('click', '.js-option', function(event) {
|
||||
|
||||
Reference in New Issue
Block a user