Skip to content

Commit

Permalink
Merge pull request #5298 from nextcloud/backport/5294/stable26
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Nov 17, 2023
2 parents 0204d38 + 69fd17d commit d4189cf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/card/CommentForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,13 @@ export default {
submit() {
const content = this.validate(true)
if (content) {
this.$emit('input', content)
this.$emit('submit', content)
// We need the plain text representation for the input event as otherwise it will propagate back to the contenteditable
// The input event is only used for change detection to make sure that the input is reset after posting the comment
const temp = document.createElement('div')
temp.innerHTML = content
const text = temp.textContent || temp.innerText || ''
this.$emit('input', text)
this.$emit('submit', text)
}
},
/* All credits for this go to the talk app
Expand Down

0 comments on commit d4189cf

Please sign in to comment.