From 4a291866bd1f45d95c4231e7cf4c6da3402337e5 Mon Sep 17 00:00:00 2001 From: Mathias Schopmans Date: Mon, 3 Apr 2017 15:49:53 +0200 Subject: [PATCH] Add scroll to top on navigate action --- js/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/client.js b/js/client.js index a7c561e..f902ebe 100644 --- a/js/client.js +++ b/js/client.js @@ -29,6 +29,7 @@ const historyManager = store => { return next => action => { if(action.type === NAVIGATE && action.pushToHistory === true) { + window.scrollTo(0, 0); history.push(`/${action.pageName}.html`); } return next(action);