Merge pull request #4297 from matrix-org/t3chguy/kbd11

Keyboard shortcuts: Escape cancel reply and fix Ctrl+K
This commit is contained in:
Michael Telatynski
2020-03-30 10:30:38 +01:00
committed by GitHub
4 changed files with 13 additions and 1 deletions
@@ -131,8 +131,13 @@ export default class SendMessageComposer extends React.Component {
this.onVerticalArrow(event, false);
} else if (this._prepareToEncrypt) {
this._prepareToEncrypt();
} else if (event.key === Key.ESCAPE) {
dis.dispatch({
action: 'reply_to_event',
event: null,
});
}
}
};
onVerticalArrow(e, up) {
// arrows from an initial-caret composer navigates recent messages to edit