diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2018-07-29 23:52:06 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-07-29 16:52:06 +0200 |
commit | 06c83527f5e4b7c8460f7d4a62322d2b8e805056 (patch) | |
tree | 4f78cae7f5954993299c84996eb314152d9a3abe /app/javascript/mastodon/features/followers/index.js | |
parent | 0a3cc246acca9645d5d41a25d73f510ff67af6f6 (diff) |
Do not scroll up when modal is opened (#8095)
Diffstat (limited to 'app/javascript/mastodon/features/followers/index.js')
-rw-r--r-- | app/javascript/mastodon/features/followers/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/followers/index.js b/app/javascript/mastodon/features/followers/index.js index 919a89332..5bb8fdd6a 100644 --- a/app/javascript/mastodon/features/followers/index.js +++ b/app/javascript/mastodon/features/followers/index.js @@ -1,5 +1,6 @@ import React from 'react'; import { connect } from 'react-redux'; +import ImmutablePureComponent from 'react-immutable-pure-component'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from '../../components/loading_indicator'; @@ -14,7 +15,6 @@ import Column from '../ui/components/column'; import HeaderContainer from '../account_timeline/containers/header_container'; import LoadMore from '../../components/load_more'; import ColumnBackButton from '../../components/column_back_button'; -import ImmutablePureComponent from 'react-immutable-pure-component'; const mapStateToProps = (state, props) => ({ accountIds: state.getIn(['user_lists', 'followers', props.params.accountId, 'items']), @@ -27,6 +27,7 @@ export default class Followers extends ImmutablePureComponent { static propTypes = { params: PropTypes.object.isRequired, dispatch: PropTypes.func.isRequired, + shouldUpdateScroll: PropTypes.func, accountIds: ImmutablePropTypes.list, hasMore: PropTypes.bool, }; @@ -57,7 +58,7 @@ export default class Followers extends ImmutablePureComponent { } render () { - const { accountIds, hasMore } = this.props; + const { shouldUpdateScroll, accountIds, hasMore } = this.props; let loadMore = null; @@ -77,7 +78,7 @@ export default class Followers extends ImmutablePureComponent { <Column> <ColumnBackButton /> - <ScrollContainer scrollKey='followers'> + <ScrollContainer scrollKey='followers' shouldUpdateScroll={shouldUpdateScroll}> <div className='scrollable' onScroll={this.handleScroll}> <div className='followers'> <HeaderContainer accountId={this.props.params.accountId} hideTabs /> |