Skip to content

Commit

Permalink
#2490 - Implement image-attachment by pasting it (#2496)
Browse files Browse the repository at this point in the history
* implement image-attachment by pasting it

* remove the file from another task
  • Loading branch information
SebinSong authored Jan 12, 2025
1 parent 494c3f8 commit 94fc55d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/views/containers/chatroom/SendArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,11 @@ export default ({
}
},
handlePaste (e) {
if (e.clipboardData.files.length > 0) {
this.fileAttachmentHandler(e.clipboardData.files, true)
return
}
// fix for the edge-case related to 'paste' action when nothing has been typed
// (reference: https://github.com/okTurtles/group-income/issues/2369)
const currVal = this.$refs.textarea.value
Expand Down

0 comments on commit 94fc55d

Please sign in to comment.