mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
Merge pull request #333 from sveltejs/gh-332
only blur activeElement if there is one
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user