Skip to content

Commit 15a77af

Browse files
committed
blur active element instead of focusing document - closes #664
1 parent 70dc159 commit 15a77af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/site-kit/src/lib/search/SearchBox.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ It appears when the user clicks on the `Search` component or presses the corresp
7474
last_scroll_position = null;
7575
document.body.style.position = '';
7676
document.body.tabIndex = -1;
77-
document.body.focus();
77+
(document.activeElement as HTMLElement)?.blur();
7878
document.body.removeAttribute('tabindex');
7979
window.scrollTo(0, scroll);
8080

0 commit comments

Comments
 (0)