From 3331fa1431da2a180744996bb0e5d0258abfbd1f Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Fri, 20 Aug 2021 08:38:32 +1000 Subject: [PATCH] Update clipboard api query to fix document focus bug --- src/helpers/shared.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/shared.ts b/src/helpers/shared.ts index 152dcae..9dad208 100644 --- a/src/helpers/shared.ts +++ b/src/helpers/shared.ts @@ -122,6 +122,8 @@ export async function clipboardSupported(): Promise { try { await navigator.clipboard.readText(); query = await navigator.permissions.query({ name: "clipboard-read" }); + // Focus window after permission dialog closed to allow further calls the api + window.focus(); } catch { return false; }