Skip to content

Commit

Permalink
fix: don't trigger message send on Enter if isComposing is true
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Sep 5, 2024
1 parent 8710aa7 commit fd95fc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export class AutocompleteTextareaComponent
}

enterHit(event: Event) {
if (this.inputMode === 'desktop') {
if (this.inputMode === 'desktop' && !(event as KeyboardEvent).isComposing) {
event.preventDefault();
this.updateMentionedUsersFromText();
this.send.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class TextareaComponent
}

enterHit(event: Event) {
if (this.inputMode === 'desktop') {
if (this.inputMode === 'desktop' && !(event as KeyboardEvent).isComposing) {
event.preventDefault();
this.send.next();
}
Expand Down

0 comments on commit fd95fc4

Please sign in to comment.