mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Bugfix: AskPopupView tabbing failed now with input fields
This commit is contained in:
parent
aff9ba29e7
commit
639098f401
2 changed files with 13 additions and 5 deletions
|
@ -5,4 +5,9 @@
|
|||
padding: 3em 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
box-shadow: 0 0 1px inset;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -69,12 +69,15 @@ export class AskPopupView extends AbstractViewPopup {
|
|||
onBuild() {
|
||||
// shortcuts.add('tab', 'shift', 'Ask', () => {
|
||||
shortcuts.add('tab,arrowright,arrowleft', '', 'Ask', () => {
|
||||
let btn = this.querySelector('.buttonYes');
|
||||
if (btn.matches(':focus')) {
|
||||
btn = this.querySelector('.buttonNo');
|
||||
let yes = this.querySelector('.buttonYes'),
|
||||
no = this.querySelector('.buttonNo');
|
||||
if (yes.matches(':focus')) {
|
||||
no.focus();
|
||||
return false;
|
||||
} else if (no.matches(':focus')) {
|
||||
yes.focus();
|
||||
return false;
|
||||
}
|
||||
btn.focus();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue