Bugfix: AskPopupView tabbing failed now with input fields

This commit is contained in:
the-djmaze 2022-08-04 15:27:26 +02:00
parent aff9ba29e7
commit 639098f401
2 changed files with 13 additions and 5 deletions

View file

@ -5,4 +5,9 @@
padding: 3em 15px; padding: 3em 15px;
text-align: center; text-align: center;
} }
button:focus {
box-shadow: 0 0 1px inset;
}
} }

View file

@ -69,12 +69,15 @@ export class AskPopupView extends AbstractViewPopup {
onBuild() { onBuild() {
// shortcuts.add('tab', 'shift', 'Ask', () => { // shortcuts.add('tab', 'shift', 'Ask', () => {
shortcuts.add('tab,arrowright,arrowleft', '', 'Ask', () => { shortcuts.add('tab,arrowright,arrowleft', '', 'Ask', () => {
let btn = this.querySelector('.buttonYes'); let yes = this.querySelector('.buttonYes'),
if (btn.matches(':focus')) { no = this.querySelector('.buttonNo');
btn = this.querySelector('.buttonNo'); if (yes.matches(':focus')) {
} no.focus();
btn.focus();
return false; return false;
} else if (no.matches(':focus')) {
yes.focus();
return false;
}
}); });
} }
} }