Browse Source

Fix scroll top in Chrome (#1949)

pull/2202/head
afc163 9 years ago
parent
commit
5f6a97dff3
  1. 1
      site/theme/template/Content/MainContent.jsx

1
site/theme/template/Content/MainContent.jsx

@ -14,6 +14,7 @@ export default class MainContent extends React.Component {
componentDidMount() { componentDidMount() {
if (!location.hash) { if (!location.hash) {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0; document.documentElement.scrollTop = 0;
} else { } else {
location.hash = location.hash; location.hash = location.hash;

Loading…
Cancel
Save