mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
Fix unexpected scrollTop change
This commit is contained in:
parent
d1568c959c
commit
3e0df406f1
@ -75,7 +75,7 @@ export default class MainContent extends React.Component {
|
||||
if (!nextProps || nextProps.location.pathname !== this.props.location.pathname) {
|
||||
this.bindScroller();
|
||||
}
|
||||
if (!window.location.hash) {
|
||||
if (!window.location.hash && nextProps && nextProps.location.pathname !== this.props.location.pathname) {
|
||||
document.body.scrollTop = 0;
|
||||
document.documentElement.scrollTop = 0;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user