Support clipboards with text/plain as well as file contents

This commit is contained in:
Scott Nonnenberg 2023-05-26 15:07:32 -07:00 committed by GitHub
parent 17eb0948ea
commit cc233fb980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,8 +52,11 @@ export class SignalClipboard {
return;
}
const clipboardContainsFiles = event.clipboardData.files?.length > 0;
if (!clipboardContainsFiles) {
event.preventDefault();
event.stopPropagation();
}
const clipboardDelta = signal
? clipboard.convert(signal)