From 1e25821816743b117350faa7cfe44071ab480f58 Mon Sep 17 00:00:00 2001 From: janderedev Date: Fri, 6 Aug 2021 15:40:32 +0200 Subject: [PATCH] Esc now removes the last reply, fixes #7 --- src/components/common/messaging/MessageBox.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/common/messaging/MessageBox.tsx b/src/components/common/messaging/MessageBox.tsx index 824ecd55..66a87bca 100644 --- a/src/components/common/messaging/MessageBox.tsx +++ b/src/components/common/messaging/MessageBox.tsx @@ -477,6 +477,10 @@ export default observer(({ channel }: Props) => { return send(); } + if (e.key === "Escape" && replies.length > 0) { + setReplies(replies.slice(0, -1)); + } + debouncedStopTyping(true); }} placeholder={