Skip to content

Commit

Permalink
fix: Start from the top
Browse files Browse the repository at this point in the history
     Reported in 200ok-ch#864

     The regression was visible, for example, when going first to
     settings and then to the changelog. The changelog would then show
     in a 'scrolled down' position.
  • Loading branch information
munen committed Jul 7, 2022
1 parent e801c39 commit 296042a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/OrgFile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class OrgFile extends PureComponent {
});
}

setTimeout(() => (document.querySelector('html').scrollTop = 0), 0);
setTimeout(() => (document.querySelector('.App').scrollTop = 0), 0);
} else if (!_.isEmpty(path)) {
if (this.props.fileIsLoaded(path)) {
this.props.org.sync({ path, shouldSuppressMessages: true });
Expand Down

0 comments on commit 296042a

Please sign in to comment.