fix: autofocus reject SR dialog input focus to "Yes" button (#2083)
This commit is contained in:
1 parent
380acc1331
commit
6c40f581a6
3 files changed
+27
-14
No files matched your search
+11
-1
@@ -443,9 +443,19 @@ function _mapDisplaySets(
|
||||
),
|
||||
actions: [
|
||||
{ id: 'cancel', text: 'Cancel', type: 'secondary' },
|
||||
{ id: 'yes', text: 'Yes', type: 'primary' },
|
||||
{
|
||||
id: 'yes',
|
||||
text: 'Yes',
|
||||
type: 'primary',
|
||||
classes: ['reject-yes-button'],
|
||||
},
|
||||
],
|
||||
onClose: () => UIDialogService.dismiss({ id: 'ds-reject-sr' }),
|
||||
onShow: () => {
|
||||
const yesButton = document.querySelector('.reject-yes-button');
|
||||
|
||||
yesButton.focus();
|
||||
},
|
||||
onSubmit: async ({ action }) => {
|
||||
switch (action.id) {
|
||||
case 'yes':
|
||||
|
||||
Reference in new issue
Block a user