Browse Source

fix(gui): if default clipboard copy failed due to permission use the fallback

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4100/head
Pranav C 2 years ago
parent
commit
97efdb11a7
  1. 4
      packages/nc-gui/composables/useCopy.ts

4
packages/nc-gui/composables/useCopy.ts

@ -15,11 +15,15 @@ export const useCopy = () => {
const { copy: _copy, isSupported } = useClipboard()
const copy = async (text: string) => {
try {
if (isSupported.value) {
await _copy(text)
} else {
copyFallback(text)
}
} catch (e) {
copyFallback(text)
}
}
return { copy }

Loading…
Cancel
Save