Merge pull request #806 from ONLYOFFICE/bugfix/fixed-main-height
Bugfix/fixed main height
This commit is contained in:
commit
9c1f380191
@ -142,7 +142,7 @@ const Layout = (props) => {
|
||||
// }
|
||||
|
||||
const bannerHeight = isBannerVisible ? 80 : 0;
|
||||
let vh = (windowHeight - 48 - bannerHeight) * 0.01;
|
||||
let vh = (windowHeight - bannerHeight) * 0.01;
|
||||
document.documentElement.style.setProperty("--vh", `${vh}px`);
|
||||
setContentHeight(height);
|
||||
};
|
||||
@ -186,6 +186,6 @@ export default inject(({ auth, bannerStore }) => {
|
||||
return {
|
||||
isTabletView: auth.settingsStore.isTabletView,
|
||||
setIsTabletView: auth.settingsStore.setIsTabletView,
|
||||
isBannerVisible: bannerStore.isBannerVisible,
|
||||
isBannerVisible: false, // bannerStore.isBannerVisible, TODO: use isBannerVisible from bannerStore after fix
|
||||
};
|
||||
})(observer(Layout));
|
||||
|
@ -19,30 +19,11 @@ const StyledMain = styled.main`
|
||||
`;
|
||||
|
||||
const Main = React.memo((props) => {
|
||||
// const orientationChanged = React.useCallback(() => {
|
||||
// if (isIOS && !isFirefox) {
|
||||
// let vh = (window.innerHeight - 48) * 0.01;
|
||||
// document.documentElement.style.setProperty("--vh", `${vh}px`);
|
||||
// }
|
||||
// }, []);
|
||||
|
||||
// React.useEffect(() => {
|
||||
// orientationChanged();
|
||||
// if (isIOS && !isFirefox) {
|
||||
// window.addEventListener("resize", orientationChanged);
|
||||
// }
|
||||
// return () => window.removeEventListener("resize", orientationChanged);
|
||||
// }, []);
|
||||
|
||||
//console.log("Main render");
|
||||
|
||||
return <StyledMain className="main" {...props} />;
|
||||
});
|
||||
|
||||
/*Main.defaultProps = {
|
||||
fullscreen: false
|
||||
};*/
|
||||
|
||||
Main.displayName = "Main";
|
||||
|
||||
export default Main;
|
||||
|
Loading…
Reference in New Issue
Block a user