diff --git a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js index 3135e0576c..792ca338d2 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js +++ b/products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js @@ -255,12 +255,14 @@ class SectionBodyContent extends React.Component { // } componentDidUpdate(prevProps) { - if (this.props.isTabletView) { - if (this.props.folderId !== prevProps.folderId) { + const { isTabletView, folderId, filter } = this.props; + + if (isTabletView) { + if (folderId !== prevProps.folderId) { this.customScrollElm && this.customScrollElm.scrollTo(0, 0); } - if (this.props.filter.page !== prevProps.filter.page) + if (filter.page !== prevProps.filter.page) this.isScrollUpOnTheNextPage = true; if (this.isScrollUpOnTheNextPage) { this.customScrollElm && this.customScrollElm.scrollTo(0, 0); @@ -1711,7 +1713,6 @@ class SectionBodyContent extends React.Component { isVersionHistoryPanel, history, } = this.props; - console.log("Files Home SectionBodyContent render", this.props); const { editingId, showMoveToPanel, showCopyPanel } = this.state; diff --git a/products/ASC.People/Client/src/components/pages/Home/index.js b/products/ASC.People/Client/src/components/pages/Home/index.js index a25f63ad5a..e99abf0991 100644 --- a/products/ASC.People/Client/src/components/pages/Home/index.js +++ b/products/ASC.People/Client/src/components/pages/Home/index.js @@ -80,20 +80,22 @@ class PureHome extends React.Component { ); } componentDidUpdate(prevProps) { - if (this.props.selection !== prevProps.selection) { + const { selection, isLoading, isTabletView, filter } = this.props; + + if (selection !== prevProps.selection) { this.renderGroupButtonMenu(); } - if (this.props.isLoading !== prevProps.isLoading) { - if (this.props.isLoading) { + if (isLoading !== prevProps.isLoading) { + if (isLoading) { utils.showLoader(); } else { utils.hideLoader(); } } - if (this.props.isTabletView) { - if (this.props.filter.page !== prevProps.filter.page) + if (isTabletView) { + if (filter.page !== prevProps.filter.page) this.isScrollUpOnTheNextPage = true; if (this.isScrollUpOnTheNextPage) { this.customScrollElm && this.customScrollElm.scrollTo(0, 0); diff --git a/web/ASC.Web.Common/src/components/PageLayout/index.js b/web/ASC.Web.Common/src/components/PageLayout/index.js index 3bbab0361c..b1cf37a140 100644 --- a/web/ASC.Web.Common/src/components/PageLayout/index.js +++ b/web/ASC.Web.Common/src/components/PageLayout/index.js @@ -332,7 +332,7 @@ class PageLayoutComponent extends React.Component { uploadFiles={uploadFiles} setSelections={setSelections} withScroll={withBodyScroll} - autoFocus={isTabletView} + autoFocus={!isTabletView} pinned={this.state.isArticlePinned} viewAs={viewAs} >