about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_gallery/index.js
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-07-29 23:52:06 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-07-29 16:52:06 +0200
commit06c83527f5e4b7c8460f7d4a62322d2b8e805056 (patch)
tree4f78cae7f5954993299c84996eb314152d9a3abe /app/javascript/mastodon/features/account_gallery/index.js
parent0a3cc246acca9645d5d41a25d73f510ff67af6f6 (diff)
Do not scroll up when modal is opened (#8095)
Diffstat (limited to 'app/javascript/mastodon/features/account_gallery/index.js')
-rw-r--r--app/javascript/mastodon/features/account_gallery/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/account_gallery/index.js b/app/javascript/mastodon/features/account_gallery/index.js
index 5f564d3a9..a6c464aff 100644
--- a/app/javascript/mastodon/features/account_gallery/index.js
+++ b/app/javascript/mastodon/features/account_gallery/index.js
@@ -23,6 +23,7 @@ const mapStateToProps = (state, props) => ({
 class LoadMoreMedia extends ImmutablePureComponent {
 
   static propTypes = {
+    shouldUpdateScroll: PropTypes.func,
     maxId: PropTypes.string,
     onLoadMore: PropTypes.func.isRequired,
   };
@@ -90,7 +91,7 @@ export default class AccountGallery extends ImmutablePureComponent {
   }
 
   render () {
-    const { medias, isLoading, hasMore } = this.props;
+    const { medias, shouldUpdateScroll, isLoading, hasMore } = this.props;
 
     let loadOlder = null;
 
@@ -110,7 +111,7 @@ export default class AccountGallery extends ImmutablePureComponent {
       <Column>
         <ColumnBackButton />
 
-        <ScrollContainer scrollKey='account_gallery'>
+        <ScrollContainer scrollKey='account_gallery' shouldUpdateScroll={shouldUpdateScroll}>
           <div className='scrollable' onScroll={this.handleScroll}>
             <HeaderContainer accountId={this.props.params.accountId} />