From 9712b8d205e07b96456ddbb6e3fd6f73f58af202 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 5 Apr 2020 13:07:16 -0700 Subject: [PATCH] fix: Document history should scroll separate to page content closes #1225 --- .../DocumentHistory/DocumentHistory.js | 60 +++++++++++-------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/app/components/DocumentHistory/DocumentHistory.js b/app/components/DocumentHistory/DocumentHistory.js index 2de8c4e1..257b3f02 100644 --- a/app/components/DocumentHistory/DocumentHistory.js +++ b/app/components/DocumentHistory/DocumentHistory.js @@ -100,30 +100,32 @@ class DocumentHistory extends React.Component { const showLoading = !this.isLoaded && this.isFetching; return ( - - {showLoading ? ( - - - - ) : ( - - {this.revisions.map((revision, index) => ( - - ))} - - )} - {this.allowLoadMore && ( - - )} - + + + {showLoading ? ( + + + + ) : ( + + {this.revisions.map((revision, index) => ( + + ))} + + )} + {this.allowLoadMore && ( + + )} + + ); } } @@ -133,6 +135,16 @@ const Loading = styled.div` `; const Wrapper = styled(Flex)` + position: fixed; + top: 0; + right: 0; + z-index: 1; + min-width: ${props => props.theme.sidebarWidth}; + overflow: scroll; + overscroll-behavior: none; +`; + +const Sidebar = styled(Flex)` background: ${props => props.theme.background}; min-width: ${props => props.theme.sidebarWidth}; border-left: 1px solid ${props => props.theme.divider};