Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Prevent escape to cancel edit from also scrolling to bottom (#7380)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Dec 15, 2021
1 parent 3c9c82e commit 7857bf2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/views/rooms/EditMessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
switch (action) {
case MessageComposerAction.Send:
this.sendEdit();
event.stopPropagation();
event.preventDefault();
break;
case MessageComposerAction.CancelEditing:
event.stopPropagation();
this.cancelEdit();
break;
case MessageComposerAction.EditPrevMessage: {
Expand Down

0 comments on commit 7857bf2

Please sign in to comment.