1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-18 23:18:27 +00:00

fix-scroll-to-changes-bug (#2773)

This commit is contained in:
Michael An 2019-01-07 11:28:26 +08:00 committed by Daniel Pan
parent 41f9d58dc6
commit 12c841e700

View File

@ -64,10 +64,6 @@ class DraftReview extends React.Component {
componentDidMount() { componentDidMount() {
this.initialContent(); this.initialContent();
document.addEventListener('selectionchange', this.setBtnPosition); document.addEventListener('selectionchange', this.setBtnPosition);
let that = this;
setTimeout(() => {
that.getChangedNodes();
}, 1000);
} }
initialContent = () => { initialContent = () => {
@ -116,6 +112,10 @@ class DraftReview extends React.Component {
draftOriginContent: draftOriginContent.data, draftOriginContent: draftOriginContent.data,
isLoading: false isLoading: false
}); });
let that = this;
setTimeout(() => {
that.getChangedNodes();
}, 100);
})); }));
})); }));
break; break;