debt - remove some any casts from window

This commit is contained in:
Benjamin Pasero
2020-09-11 11:40:05 +02:00
parent 8e12a92976
commit 13aca0a170
3 changed files with 7 additions and 7 deletions

View File

@@ -410,9 +410,9 @@ export function getClientArea(element: HTMLElement): Dimension {
}
// If visual view port exits and it's on mobile, it should be used instead of window innerWidth / innerHeight, or document.body.clientWidth / document.body.clientHeight
if (platform.isIOS && (<any>window).visualViewport) {
const width = (<any>window).visualViewport.width;
const height = (<any>window).visualViewport.height - (
if (platform.isIOS && window.visualViewport) {
const width = window.visualViewport.width;
const height = window.visualViewport.height - (
browser.isStandalone
// in PWA mode, the visual viewport always includes the safe-area-inset-bottom (which is for the home indicator)
// even when you are using the onscreen monitor, the visual viewport will include the area between system statusbar and the onscreen keyboard