about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/favourited_statuses
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/favourited_statuses
parent0a3cc246acca9645d5d41a25d73f510ff67af6f6 (diff)
Do not scroll up when modal is opened (#8095)
Diffstat (limited to 'app/javascript/mastodon/features/favourited_statuses')
-rw-r--r--app/javascript/mastodon/features/favourited_statuses/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/favourited_statuses/index.js b/app/javascript/mastodon/features/favourited_statuses/index.js
index 6f1c863b4..3973ed3cb 100644
--- a/app/javascript/mastodon/features/favourited_statuses/index.js
+++ b/app/javascript/mastodon/features/favourited_statuses/index.js
@@ -27,6 +27,7 @@ export default class Favourites extends ImmutablePureComponent {
 
   static propTypes = {
     dispatch: PropTypes.func.isRequired,
+    shouldUpdateScroll: PropTypes.func,
     statusIds: ImmutablePropTypes.list.isRequired,
     intl: PropTypes.object.isRequired,
     columnId: PropTypes.string,
@@ -67,7 +68,7 @@ export default class Favourites extends ImmutablePureComponent {
   }, 300, { leading: true })
 
   render () {
-    const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
+    const { intl, shouldUpdateScroll, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
     const pinned = !!columnId;
 
     return (
@@ -90,6 +91,7 @@ export default class Favourites extends ImmutablePureComponent {
           hasMore={hasMore}
           isLoading={isLoading}
           onLoadMore={this.handleLoadMore}
+          shouldUpdateScroll={shouldUpdateScroll}
         />
       </Column>
     );