diff --git a/client/js/main.js b/client/js/main.js index 0245e5e6..c9e07476 100644 --- a/client/js/main.js +++ b/client/js/main.js @@ -3,6 +3,12 @@ require('./util/polyfill.js'); const page = require('page'); +const origPushState = page.Context.prototype.pushState; +page.Context.prototype.pushState = function() { + window.scrollTo(0, 0); + origPushState.call(this); +}; + const mousetrap = require('mousetrap'); page(/.*/, (ctx, next) => { mousetrap.reset();