Commit 1700e663 authored by Audrey Hamelers's avatar Audrey Hamelers

#864 scroll to top

parent d7b351c2
Pipeline #13075 passed with stages
in 5 minutes and 36 seconds
......@@ -150,6 +150,9 @@ class Review extends React.Component {
showSuccess = () =>
new Promise((resolve, reject) => {
if (this.page) {
window.scrollY = 0
window.pageYOffset = 0
document.scrollingElement.scrollTop = 0
this.setState({ success: true })
setTimeout(() => {
this.setState({ success: false }, resolve())
......
......@@ -116,7 +116,12 @@ class Submit extends React.Component {
this.setState({ editing: null })
}
pruneDupes = () => this.setState({ prune: true })
showSuccess = () => this.setState({ success: true })
showSuccess = () => {
window.scrollY = 0
window.pageYOffset = 0
document.scrollingElement.scrollTop = 0
this.setState({ success: true })
}
render() {
const { currentUser, manuscript, duplicates: checkDupes = [] } = this.props
const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment