mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Only trap escape key for cancel reply if there is a reply (#11140)
fall through (to clear read marker) otherwise Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
d404e0656a
commit
3ac9066e46
1 changed files with 9 additions and 7 deletions
|
@ -351,13 +351,15 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||
}
|
||||
break;
|
||||
case KeyBindingAction.CancelReplyOrEdit:
|
||||
dis.dispatch({
|
||||
action: "reply_to_event",
|
||||
event: null,
|
||||
context: this.context.timelineRenderingType,
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if (!!this.context.replyToEvent) {
|
||||
dis.dispatch({
|
||||
action: "reply_to_event",
|
||||
event: null,
|
||||
context: this.context.timelineRenderingType,
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue