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

This commit is contained in:
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

View file

@ -160,9 +160,11 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
switch (action) { switch (action) {
case MessageComposerAction.Send: case MessageComposerAction.Send:
this.sendEdit(); this.sendEdit();
event.stopPropagation();
event.preventDefault(); event.preventDefault();
break; break;
case MessageComposerAction.CancelEditing: case MessageComposerAction.CancelEditing:
event.stopPropagation();
this.cancelEdit(); this.cancelEdit();
break; break;
case MessageComposerAction.EditPrevMessage: { case MessageComposerAction.EditPrevMessage: {