mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Replaced more knockoutjs hasfocus for autofocus=""
This commit is contained in:
parent
e4ddef97d6
commit
dc3b76f53a
4 changed files with 15 additions and 41 deletions
|
|
@ -20,8 +20,6 @@ class MessageOpenPgpPopupView extends AbstractViewNext {
|
|||
this.privateKeys = ko.observableArray([]);
|
||||
|
||||
this.password = ko.observable('');
|
||||
this.password.focus = ko.observable(false);
|
||||
this.buttonFocus = ko.observable(false);
|
||||
|
||||
this.resultCallback = null;
|
||||
|
||||
|
|
@ -72,8 +70,6 @@ class MessageOpenPgpPopupView extends AbstractViewNext {
|
|||
this.notification('');
|
||||
|
||||
this.password('');
|
||||
this.password.focus(false);
|
||||
this.buttonFocus(false);
|
||||
|
||||
this.selectedKey(false);
|
||||
this.submitRequest(false);
|
||||
|
|
@ -84,16 +80,11 @@ class MessageOpenPgpPopupView extends AbstractViewNext {
|
|||
|
||||
onBuild(oDom) {
|
||||
key('tab,shift+tab', KeyState.PopupMessageOpenPGP, () => {
|
||||
switch (true) {
|
||||
case this.password.focus():
|
||||
this.buttonFocus(true);
|
||||
break;
|
||||
case this.buttonFocus():
|
||||
this.password.focus(true);
|
||||
break;
|
||||
// no default
|
||||
let btn = this.querySelector('.inputPassword');
|
||||
if (btn.matches(':focus')) {
|
||||
btn = this.querySelector('.buttonDo');
|
||||
}
|
||||
|
||||
btn.focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
@ -114,7 +105,7 @@ class MessageOpenPgpPopupView extends AbstractViewNext {
|
|||
|
||||
self.selectedKey(ko.dataFor(this)); // eslint-disable-line no-invalid-this
|
||||
|
||||
self.password.focus(true);
|
||||
// this.querySelector('.inputPassword').focus();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -122,11 +113,6 @@ class MessageOpenPgpPopupView extends AbstractViewNext {
|
|||
this.clearPopup();
|
||||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
this.password.focus(true);
|
||||
// this.buttonFocus(true);
|
||||
}
|
||||
|
||||
onShow(fCallback, privateKeys) {
|
||||
this.clearPopup();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue