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

Commit

Permalink
only blur activeElement if there is one - fixes #332
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 2, 2018
1 parent d1fcd07 commit 003fa8a
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 003fa8a

Please sign in to comment.