Merge pull request #333 from sveltejs/gh-332

only blur activeElement if there is one
This commit is contained in:
Rich Harris
2018-08-02 10:43:27 -04:00
committed by GitHub

View File

@@ -298,7 +298,7 @@ async function navigate(target: Target, id: number): Promise<any> {
await goto(redirect.location, { replaceState: true });
} else {
render(data, nullable_depth, scroll_history[id], token);
document.activeElement.blur();
if (document.activeElement) document.activeElement.blur();
}
}