Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #333 from sveltejs/gh-332
Browse files Browse the repository at this point in the history
only blur activeElement if there is one
  • Loading branch information
Rich-Harris authored Aug 2, 2018
2 parents 81f483d + 003fa8a commit 31327b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 31327b3

Please sign in to comment.