Scroll to top of page when changing path

This commit is contained in:
6ea86b96 2017-05-31 14:24:55 +04:00
parent fa66f4e918
commit b1bbf7ee4e

View file

@ -52,6 +52,7 @@ export function doChangePath(path) {
const state = getState() const state = getState()
const pageTitle = selectPageTitle(state) const pageTitle = selectPageTitle(state)
window.document.title = pageTitle window.document.title = pageTitle
window.scrollTo(0, 0)
const currentPage = selectCurrentPage(state) const currentPage = selectCurrentPage(state)
if (currentPage === 'search') { if (currentPage === 'search') {