diff --git a/TODO.md b/TODO.md index 64815086..58a9bb79 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TODO -- deselect/unfocus after removing or replying to messages - add room members loading indicator - fix event ID mention regex diff --git a/src/gui/Pages/Chat/Composer.qml b/src/gui/Pages/Chat/Composer.qml index e606c36e..e2977192 100644 --- a/src/gui/Pages/Chat/Composer.qml +++ b/src/gui/Pages/Chat/Composer.qml @@ -166,6 +166,14 @@ Rectangle { } Component.onCompleted: { + area.Keys.onEscapePressed.connect(ev => { + if (chat.replyToEventId) { + chat.replyToEventId = "" + chat.replyToUserId = "" + chat.replyToDisplayName = "" + } + }) + area.Keys.onReturnPressed.connect(ev => { ev.accepted = true