Web: Common: Layout: fixed page height for large tablets
This commit is contained in:
parent
2b8dfc80e9
commit
8082be3eb4
@ -147,6 +147,9 @@ const Layout = (props) => {
|
|||||||
let lastInnerHeight, noChangeCount;
|
let lastInnerHeight, noChangeCount;
|
||||||
|
|
||||||
const updateHeight = () => {
|
const updateHeight = () => {
|
||||||
|
const correctorMobileChrome = 57; // ios
|
||||||
|
const correctorTabletSafari = 71; // ios
|
||||||
|
|
||||||
clearInterval(intervalHandler);
|
clearInterval(intervalHandler);
|
||||||
clearTimeout(timeoutHandler);
|
clearTimeout(timeoutHandler);
|
||||||
|
|
||||||
@ -157,7 +160,7 @@ const Layout = (props) => {
|
|||||||
|
|
||||||
if (isMobileOnly && isIOS && isChrome) {
|
if (isMobileOnly && isIOS && isChrome) {
|
||||||
if (window.innerHeight < window.innerWidth && isPortrait) {
|
if (window.innerHeight < window.innerWidth && isPortrait) {
|
||||||
height = window.screen.availWidth - 57;
|
height = window.screen.availWidth - correctorMobileChrome;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isTablet && isIOS && isSafari) {
|
if (isTablet && isIOS && isSafari) {
|
||||||
@ -165,7 +168,7 @@ const Layout = (props) => {
|
|||||||
window.innerHeight < window.innerWidth &&
|
window.innerHeight < window.innerWidth &&
|
||||||
window.innerWidth > 1024
|
window.innerWidth > 1024
|
||||||
) {
|
) {
|
||||||
height = window.screen.availWidth - 57;
|
height = window.screen.availWidth - correctorTabletSafari;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setContentHeight(height);
|
setContentHeight(height);
|
||||||
|
Loading…
Reference in New Issue
Block a user