mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 13:08:41 +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) {
|
if (!nextProps || nextProps.location.pathname !== this.props.location.pathname) {
|
||||||
this.bindScroller();
|
this.bindScroller();
|
||||||
}
|
}
|
||||||
if (!window.location.hash) {
|
if (!window.location.hash && nextProps && nextProps.location.pathname !== this.props.location.pathname) {
|
||||||
document.body.scrollTop = 0;
|
document.body.scrollTop = 0;
|
||||||
document.documentElement.scrollTop = 0;
|
document.documentElement.scrollTop = 0;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user