Add scrollRestoration option

This commit is contained in:
Behind The Math
2018-01-22 18:56:22 -05:00
parent 546b9abba3
commit e7935d9c74
4 changed files with 7 additions and 1 deletions

View File

@@ -306,7 +306,7 @@ Pjax.prototype = {
}
}
}
else {
else if (state.options.scrollRestoration && state.options.scrollPos) {
window.scrollTo(state.options.scrollPos[0], state.options.scrollPos[1])
}