Skip to content

Commit

Permalink
Merge pull request #220 from jimohalloran/long_page_transition
Browse files Browse the repository at this point in the history
Add delay to scroll for less jarring page transitions
  • Loading branch information
cretueusebiu authored Oct 31, 2020
2 parents 57cacb9 + 8d4e5b9 commit 50b2308
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/js/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ function scrollBehavior (to, from, savedPosition) {
return {}
}

return { x: 0, y: 0 }
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ x: 0, y: 0 })
}, 190)
})
}

/**
Expand Down

0 comments on commit 50b2308

Please sign in to comment.