Cleanup CSS and drop bMobileDevice detection.

Touch devices can be any size and can use (bluetooth/usb-c mouse/keyboard) these days.
It's all about pixels and currently if the mode is mobile/no-mobile (this can be improved later).
This commit is contained in:
djmaze 2020-09-30 12:31:34 +02:00
parent 25b4c899d0
commit efcefbaf78
60 changed files with 233 additions and 379 deletions

View file

@ -26,7 +26,6 @@ import { format as momentorFormat } from 'Common/Momentor';
import { getMessageFlagsFromCache, setMessageFlagsToCache, setFolderHash } from 'Common/Cache';
import { HtmlEditor } from 'Common/HtmlEditor';
import { bMobileDevice } from 'Common/Globals';
import AppStore from 'Stores/User/App';
import SettingsStore from 'Stores/User/Settings';
@ -1080,17 +1079,16 @@ class ComposePopupView extends AbstractViewNext {
}
setFocusInPopup() {
if (!bMobileDevice) {
setTimeout(() => {
if (!this.to()) {
this.to.focused(true);
} else if (this.oEditor) {
if (!this.to.focused()) {
this.oEditor.focus();
}
// rl.settings.app('mobile') ||
setTimeout(() => {
if (!this.to()) {
this.to.focused(true);
} else if (this.oEditor) {
if (!this.to.focused()) {
this.oEditor.focus();
}
}, 100);
}
}
}, 100);
}
tryToClosePopup() {