From 5759758f713337c5354e4d847e21ed48a6827668 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Tue, 2 Nov 2021 18:41:33 +0300 Subject: [PATCH 1/3] Bug 53416 - Client.Files.Desktop: Fixed scrolls under Ubuntu. --- .../components/PageLayout/sub-components/article-body.js | 2 +- .../components/PageLayout/sub-components/section-body.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/asc-web-common/components/PageLayout/sub-components/article-body.js b/packages/asc-web-common/components/PageLayout/sub-components/article-body.js index 0be5f8e943..c0e9bab7b1 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/article-body.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/article-body.js @@ -9,8 +9,8 @@ import { isMobile } from "react-device-detect"; const StyledArticleBody = styled.div` ${(props) => props.displayBorder && `outline: 1px dotted;`} flex-grow: 1; - height: 100%; + ${(props) => (props.isDesktop ? "height:auto" : "height:100%")}; .custom-scrollbar { width: calc(100% + 24px) !important; } diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js index c49ef976c2..7de9619356 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js @@ -12,7 +12,9 @@ import { tablet, desktop } from "@appserver/components/utils/device"; const commonStyles = css` flex-grow: 1; - height: 100%; + + ${(props) => (props.isDesktop ? "height: auto" : "height: 100%")}; + border-left: none; -webkit-user-select: none; @@ -114,6 +116,7 @@ class SectionBody extends React.Component { viewAs, withScroll, isLoaded, + isDesktop, } = this.props; const focusProps = autoFocus @@ -131,6 +134,7 @@ class SectionBody extends React.Component { viewAs={viewAs} pinned={pinned} isLoaded={isLoaded} + isDesktop={isDesktop} className="section-body" > {withScroll ? ( @@ -219,7 +223,10 @@ SectionBody.defaultProps = { }; export default inject(({ auth }) => { + const { settingsStore } = auth; + const { isDesktopClient: isDesktop } = settingsStore; return { isLoaded: auth.isLoaded, + isDesktop, }; })(observer(SectionBody)); From da8e34930fa7b42588632d02a5415a5ac33ac209 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 3 Nov 2021 11:59:54 +0300 Subject: [PATCH 2/3] Web: Added prop. --- .../components/PageLayout/sub-components/section-body.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js index 7ae25a282c..4dce40a8d4 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js @@ -194,6 +194,7 @@ class SectionBody extends React.Component { withScroll={withScroll} pinned={pinned} isLoaded={isLoaded} + isDesktop={isDesktop} > {withScroll ? ( !isMobile ? ( From bf4126cc0e1d9f1b441acfb006f8e09e6889531e Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 3 Nov 2021 15:25:04 +0300 Subject: [PATCH 3/3] Web: Deleted console.log. --- .../components/PageLayout/sub-components/section-body.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js index 4dce40a8d4..2a2dbbcfae 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js @@ -151,7 +151,7 @@ class SectionBody extends React.Component { tabIndex: -1, } : {}; - console.log("isDesktop", isDesktop); + return uploadFiles ? (