From 3fb0c9883b66f7ed693537799d7f07020dd933d0 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 11 Dec 2015 02:32:30 +0000 Subject: [PATCH] escape key to cancel search box --- src/components/views/rooms/SearchBar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/rooms/SearchBar.js b/src/components/views/rooms/SearchBar.js index c75a4f3c..e66f1236 100644 --- a/src/components/views/rooms/SearchBar.js +++ b/src/components/views/rooms/SearchBar.js @@ -42,6 +42,9 @@ module.exports = React.createClass({ if (e.keyCode === 13) { // on enter... this.onSearch(); } + if (e.keyCode === 27) { // escape... + this.props.onCancelClick(); + } }, onSearch: function() {