FIX: Paste event not propagating from composer using Uppy (#14040)

When I added the paste event for files in the composer to
send to Uppy, I inadvertently called event.preventDefault()
if the pasted data was text. I removed that now, and I only
return early if the user cannot upload, and if there are no
files on the clipboard nothing happens.
This commit is contained in:
Martin Brennan 2021-08-13 14:09:59 +10:00 committed by GitHub
parent 0198ffd2b1
commit 6597a2f7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -382,13 +382,12 @@ export default Mixin.create({
return;
}
const { canUpload, canPasteHtml, types } = clipboardHelpers(event, {
const { canUpload } = clipboardHelpers(event, {
siteSettings: this.siteSettings,
canUpload: true,
});
if (!canUpload || canPasteHtml || types.includes("text/plain")) {
event.preventDefault();
if (!canUpload) {
return;
}