Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(desktop): blur active element on main window mount

Richie McIlroy9afe779be669
diff --git a/apps/desktop/src/routes/(window-chrome)/new-main/index.tsx b/apps/desktop/src/routes/(window-chrome)/new-main/index.tsx
index f417e5402..3be551148 100644
--- a/apps/desktop/src/routes/(window-chrome)/new-main/index.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/new-main/index.tsx
@@ -1190,6 +1190,10 @@ function Page() {
createUpdateCheck();
onMount(async () => {
+ if (document.activeElement instanceof HTMLElement) {
+ document.activeElement.blur();
+ }
+
const { __CAP__ } = window as typeof window & {
__CAP__?: { initialTargetMode?: RecordingTargetMode | null };
};