hash fix: wait to run scrollIntoView (#439)
* simplify createLocation and wait to run scrollIntoView * remove createLocation change
This commit is contained in:
committed by
Yoshua Wuyts
parent
0f755f010f
commit
4e410ce50b
@@ -63,7 +63,9 @@ function Framework (opts) {
|
|||||||
bus.on('pushState', function (href) {
|
bus.on('pushState', function (href) {
|
||||||
if (href) window.history.pushState({}, null, href)
|
if (href) window.history.pushState({}, null, href)
|
||||||
bus.emit('render')
|
bus.emit('render')
|
||||||
|
setTimeout(function () {
|
||||||
scrollIntoView()
|
scrollIntoView()
|
||||||
|
}, 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
if (opts.href !== false) {
|
if (opts.href !== false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user