Skip to content

Commit

Permalink
fix: Chat message form not preserved on edit message - EXO-70366
Browse files Browse the repository at this point in the history
Before this change, when send a message which has several line breaks and edit the message, on edit, the message form isn't displayed. After this change, on edit, the message form should be maintained.

(cherry picked from commit 2c239dc)
  • Loading branch information
Jihed525 committed Mar 28, 2024
1 parent c8f7e89 commit 45cab44
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -173,6 +173,7 @@ export default {
document.addEventListener(chatConstants.ACTION_MESSAGE_DELETE, this.putFocusOnComposer);
document.addEventListener(chatConstants.ACTION_MESSAGE_QUOTE, this.quoteMessage);
this.$root.$on('edit-chat-message', messageToEdit => {
messageToEdit.msg = messageToEdit.msg.replaceAll('\n','<br>');
this.chatMessage = messageToEdit;
this.$refs.messageComposerArea.innerHTML = this.chatMessage.msg;
this.putFocusOnComposer();
Expand Down

0 comments on commit 45cab44

Please sign in to comment.