FIX: correctly set value on textarea interactor (#21990)

This would mostly work without it by mutation but could cause subtle bugs.
This commit is contained in:
Joffrey JAFFEUX 2023-06-08 01:21:30 +02:00 committed by GitHub
parent f9bd32af2d
commit 699f3e7014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ export default class ChatComposer extends Component {
@action
didUpdateMessage() {
this.cancelPersistDraft();
this.composer.value = this.currentMessage.message;
this.composer.textarea.value = this.currentMessage.message;
this.persistDraft();
}
@ -417,7 +417,7 @@ export default class ChatComposer extends Component {
},
afterComplete: (text, event) => {
event.preventDefault();
this.composer.value = text;
this.composer.textarea.value = text;
this.composer.focus();
this.captureMentions();
},
@ -433,7 +433,7 @@ export default class ChatComposer extends Component {
treatAsTextarea: true,
afterComplete: (text, event) => {
event.preventDefault();
this.composer.value = text;
this.composer.textarea.value = text;
this.composer.focus();
},
}
@ -450,7 +450,7 @@ export default class ChatComposer extends Component {
key: ":",
afterComplete: (text, event) => {
event.preventDefault();
this.composer.value = text;
this.composer.textarea.value = text;
this.composer.focus();
},
treatAsTextarea: true,