mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-19 22:05:20 +00:00
only blur activeElement if there is one - fixes #332
This commit is contained in:
@@ -298,7 +298,7 @@ async function navigate(target: Target, id: number): Promise<any> {
|
|||||||
await goto(redirect.location, { replaceState: true });
|
await goto(redirect.location, { replaceState: true });
|
||||||
} else {
|
} else {
|
||||||
render(data, nullable_depth, scroll_history[id], token);
|
render(data, nullable_depth, scroll_history[id], token);
|
||||||
document.activeElement.blur();
|
if (document.activeElement) document.activeElement.blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user