From 4e410ce50bbaa9116dfff46d9f6d8402f54ea727 Mon Sep 17 00:00:00 2001 From: Seth Vincent Date: Sat, 25 Mar 2017 02:17:43 -0700 Subject: [PATCH] hash fix: wait to run scrollIntoView (#439) * simplify createLocation and wait to run scrollIntoView * remove createLocation change --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ce5f6a5..56719b0 100644 --- a/index.js +++ b/index.js @@ -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) {