FIX: Pasting files into chat was not working (#21995)

Followup to e6c6c342d9,
we missed one part of this refactor which was to give
the correct composer element reference to ChatComposerUploads.
Without this the pasteEventListener for uploads was not
bound so uploading via paste did not work.

I tried to test this, and though I can write binary/text to
the clipboard and paste it into the composer, it does not
seem to be possible to end up with a paste event that
has clipboardData.files filled in, which is what is used
for the uploads. I think this is a restriction of JS
generally, and there doesn't seem to be a way to work around
it, so unfortunately we have to have no test for this still.
This commit is contained in:
Martin Brennan 2023-06-08 13:03:55 +10:00 committed by GitHub
parent 2191b879c6
commit e48750281e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@
@onUploadChanged={{this.onUploadChanged}}
@existingUploads={{this.currentMessage.uploads}}
@uploadDropZone={{@uploadDropZone}}
@composerInputEl={{this.textareaInteractor.textarea}}
@composerInputEl={{this.composer.textarea.element}}
/>
{{/if}}