Skip to content
Snippets Groups Projects
Commit 079a5201 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Répare le copier/coller pour Firefox et Safari(?)

parent 8ee830b7
Branches
Tags 0.0.921
No related merge requests found
Pipeline #18292 passed
......@@ -10,4 +10,10 @@ export function copyToClipboard(
navigator.clipboard.writeText(text).then(successCallback, failCallback)
}
})
.catch(() => {
// Firefox & Safari don't support "clipboard-write" permission.
navigator?.clipboard
?.writeText?.(text)
.then(successCallback, failCallback)
})
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment