mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Improve and cleanup isMobile
This commit is contained in:
parent
10f9ce39d9
commit
b1c7bd2c50
15 changed files with 27 additions and 43 deletions
|
|
@ -1090,7 +1090,6 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
setFocusInPopup() {
|
||||
// isMobile() ||
|
||||
setTimeout(() => {
|
||||
if (!this.to()) {
|
||||
this.to.focused(true);
|
||||
|
|
|
|||
|
|
@ -160,9 +160,7 @@ class FilterPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
if (this.isNew() && this.filter()/* && !isMobile()*/) {
|
||||
this.filter().nameFocused(true);
|
||||
}
|
||||
this.isNew() && this.filter() && this.filter().nameFocused(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ class FolderCreatePopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
// isMobile() ||
|
||||
this.folderNameFocused(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,9 +166,7 @@ class IdentityPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
if (!this.owner()/* && !isMobile()*/) {
|
||||
this.emailFocused(true);
|
||||
}
|
||||
this.owner() || this.emailFocused(true);
|
||||
}
|
||||
|
||||
onHideWithDelay() {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ class TwoFactorTestPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
onShowWithDelay() {
|
||||
// isMobile() ||
|
||||
this.codeFocused(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,9 @@ export class MenuSettingsUserView extends AbstractViewLeft {
|
|||
}
|
||||
|
||||
onBuild(dom) {
|
||||
if (isMobile()) {
|
||||
dom.addEventListener('click', event =>
|
||||
isMobile() && dom.addEventListener('click', event =>
|
||||
event.target.closestWithin('.b-settings-menu .e-item.selectable', dom) && leftPanelDisabled(true)
|
||||
);
|
||||
}
|
||||
|
||||
shortcuts.add('arrowup,arrowdown', '', KeyState.Settings,
|
||||
settingsMenuKeysHandler(dom.querySelectorAll('.b-settings-menu .e-item')));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue