aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-19 01:13:42 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:52 +0300
commit9de059571fa6ba633977fcc2be6d48ddb8b677d0 (patch)
tree46555c099319ea31ee8e45ed6a47d7fd22861fa5 /vnext/src
parent4dfdee5313ef74b6e541c0f3be58b80f1c306dbc (diff)
fix scroll on paging
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/components/Feeds.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/components/Feeds.js b/vnext/src/components/Feeds.js
index f7abd399..f0a3c523 100644
--- a/vnext/src/components/Feeds.js
+++ b/vnext/src/components/Feeds.js
@@ -56,8 +56,6 @@ class Feed extends React.Component {
this.loadMessages = this.loadMessages.bind(this);
}
componentDidMount() {
- document.body.scrollTop = 0;
- document.documentElement.scrollTop = 0;
this.loadMessages(this.props.visitor.hash, this.props.location.search);
}
componentWillReceiveProps(nextProps) {
@@ -67,6 +65,8 @@ class Feed extends React.Component {
}
}
loadMessages(hash = '', filter = '') {
+ document.body.scrollTop = 0;
+ document.documentElement.scrollTop = 0;
this.setState({ msgs: [] })
const filterParams = qs.parse(filter);
let params = Object.assign({}, filterParams || {}, this.props.query.search || {});