mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix hash jump again
This commit is contained in:
parent
156ce90a8e
commit
65c86e60ce
@ -61,7 +61,18 @@ export default class MainContent extends React.Component {
|
||||
if (!location.hash) {
|
||||
document.body.scrollTop = 0;
|
||||
document.documentElement.scrollTop = 0;
|
||||
return;
|
||||
}
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer);
|
||||
}
|
||||
this.timer = setTimeout(() => {
|
||||
location.hash = location.hash;
|
||||
}, 10);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
clearTimeout(this.timer);
|
||||
}
|
||||
|
||||
handleMenuOpenChange = (openKeys) => {
|
||||
|
Loading…
Reference in New Issue
Block a user