Browse Source

fix: copyTable fallback to useCopy with plain text for insecure context (#8346)

Signed-off-by: mertmit <mertmit99@gmail.com>
fix/src-filter
Mert E 7 months ago committed by GitHub
parent
commit
6efbe449cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/nc-gui/composables/useMultiSelect/index.ts

5
packages/nc-gui/composables/useMultiSelect/index.ts

@ -300,7 +300,10 @@ export function useMultiSelect(
const blobHTML = new Blob([copyHTML], { type: 'text/html' })
const blobPlainText = new Blob([copyPlainText], { type: 'text/plain' })
return navigator.clipboard.write([new ClipboardItem({ [blobHTML.type]: blobHTML, [blobPlainText.type]: blobPlainText })])
return (
navigator.clipboard?.write([new ClipboardItem({ [blobHTML.type]: blobHTML, [blobPlainText.type]: blobPlainText })]) ??
copy(copyPlainText)
)
}
async function copyValue(ctx?: Cell) {

Loading…
Cancel
Save