Fix wrong viewport height on login iOS
This commit is contained in:
parent
5b63730b77
commit
13e8bd5085
@ -5,7 +5,7 @@ export default class Page {
|
||||
private installed = false;
|
||||
|
||||
constructor(className: string, public isAuthPage: boolean, private onFirstMount?: (...args: any[]) => Promise<any> | void, private onMount?: (...args: any[]) => void, public onShown?: () => void) {
|
||||
this.pageEl = document.body.getElementsByClassName(className)[0] as HTMLDivElement;
|
||||
this.pageEl = document.body.querySelector('.' + className) as HTMLDivElement;
|
||||
}
|
||||
|
||||
public async mount(...args: any[]) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
//import {stackBlurImage} from '../lib/StackBlur';
|
||||
//import appStateManager from "../lib/appManagers/appStateManager";
|
||||
import { blurActiveElement } from "../helpers/dom";
|
||||
import appStateManager from "../lib/appManagers/appStateManager";
|
||||
import Page from "./page";
|
||||
|
||||
@ -13,9 +14,13 @@ let onFirstMount = () => {
|
||||
m.default.broadcast('im_mount');
|
||||
});
|
||||
|
||||
blurActiveElement();
|
||||
return new Promise<void>((resolve) => {
|
||||
window.requestAnimationFrame(() => {
|
||||
const promise = import('../lib/appManagers/appDialogsManager');
|
||||
promise.finally(async() => {
|
||||
//alert('pageIm!');
|
||||
resolve();
|
||||
|
||||
//AudioContext && global.navigator && global.navigator.mediaDevices && global.navigator.mediaDevices.getUserMedia && global.WebAssembly;
|
||||
|
||||
@ -34,7 +39,9 @@ let onFirstMount = () => {
|
||||
Array.from(document.getElementsByClassName('btn-menu-toggle')).forEach((el) => {
|
||||
misc.ButtonMenuToggleHandler(el as HTMLElement);
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//let promise = /* Promise.resolve() */.then(() => {//import('../lib/services').then(services => {
|
||||
/* fetch('assets/img/camomile.jpg')
|
||||
@ -65,8 +72,6 @@ let onFirstMount = () => {
|
||||
};
|
||||
}); */
|
||||
//});
|
||||
|
||||
return promise;
|
||||
};
|
||||
|
||||
const page = new Page('page-chats', false, onFirstMount);
|
||||
|
Loading…
Reference in New Issue
Block a user