Skip to content

Commit

Permalink
fixing user message bubbles from losing new line spaces formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Apr 10, 2024
1 parent ca07e31 commit 66ad505
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ export class SubmitButton extends InputButton<Styles> {
if (this._inputElementRef.classList.contains('text-input-placeholder')) {
this.attemptSubmit({text: '', files: uploadedFilesData});
} else {
const inputText = this._inputElementRef.textContent?.trim() as string;
// not using textContent as it ignores new line spaces
const inputText = this._inputElementRef.innerText.trim() as string;
this.attemptSubmit({text: inputText, files: uploadedFilesData});
}
}
Expand Down

0 comments on commit 66ad505

Please sign in to comment.