1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Fix escape for cancelling replies

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-01-29 10:31:59 +01:00
parent f113748520
commit 4f065ad822

View File

@@ -156,13 +156,14 @@ export default class SendMessageComposer extends React.Component {
this.onVerticalArrow(event, true); this.onVerticalArrow(event, true);
} else if (event.key === Key.ARROW_DOWN) { } else if (event.key === Key.ARROW_DOWN) {
this.onVerticalArrow(event, false); this.onVerticalArrow(event, false);
} else if (this._prepareToEncrypt) {
this._prepareToEncrypt();
} else if (event.key === Key.ESCAPE) { } else if (event.key === Key.ESCAPE) {
dis.dispatch({ dis.dispatch({
action: 'reply_to_event', action: 'reply_to_event',
event: null, event: null,
}); });
} else if (this._prepareToEncrypt) {
// This needs to be last!
this._prepareToEncrypt();
} }
}; };