From b34b6eceedd83e010a59395788fc5f201fe5b6d4 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 17 May 2017 10:11:00 +0100 Subject: [PATCH] Revert "Revert "Cancel quick-search on Escape, clearing it and returning focus to composer."" This reverts commit fdf326c9f0651c9766d55bc5aeddd60d5e0372d1. --- src/components/structures/SearchBox.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/SearchBox.js b/src/components/structures/SearchBox.js index d79617c046..d0868b690d 100644 --- a/src/components/structures/SearchBox.js +++ b/src/components/structures/SearchBox.js @@ -100,6 +100,10 @@ module.exports = React.createClass({ } switch (ev.keyCode) { + case KeyCode.ESCAPE: + this._clearSearch(); + dis.dispatch({action: 'focus_composer'}); + break; case KeyCode.KEY_K: if (ctrlCmdOnly) { if (this.refs.search) {