Update clipboard api query to fix document focus bug

This commit is contained in:
Mitchell McCaffrey 2021-08-20 08:38:32 +10:00
parent c7d56c6ac2
commit 3331fa1431

View File

@ -122,6 +122,8 @@ export async function clipboardSupported(): Promise<boolean> {
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;
}