Prevent escape to cancel edit from also scrolling to bottom (#7380)

pull/21833/head
Michael Telatynski 2021-12-15 16:21:32 +00:00 committed by GitHub
parent 3c9c82ee0d
commit 7857bf2da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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: {