mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:52:46 +08:00
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:
parent
0198ffd2b1
commit
6597a2f7dd
|
@ -382,13 +382,12 @@ export default Mixin.create({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { canUpload, canPasteHtml, types } = clipboardHelpers(event, {
|
const { canUpload } = clipboardHelpers(event, {
|
||||||
siteSettings: this.siteSettings,
|
siteSettings: this.siteSettings,
|
||||||
canUpload: true,
|
canUpload: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!canUpload || canPasteHtml || types.includes("text/plain")) {
|
if (!canUpload) {
|
||||||
event.preventDefault();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user