Update clipboard api query to fix document focus bug
This commit is contained in:
parent
c7d56c6ac2
commit
3331fa1431
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user