hash fix: wait to run scrollIntoView (#439)

* simplify createLocation and wait to run scrollIntoView

* remove createLocation change
This commit is contained in:
Seth Vincent
2017-03-25 10:17:43 +01:00
committed by Yoshua Wuyts
parent 0f755f010f
commit 4e410ce50b
+3 -1
View File
@@ -63,7 +63,9 @@ function Framework (opts) {
bus.on('pushState', function (href) {
if (href) window.history.pushState({}, null, href)
bus.emit('render')
scrollIntoView()
setTimeout(function () {
scrollIntoView()
}, 0)
})
if (opts.href !== false) {