Skip to content

Commit 3fb0c98

Browse files
committed
escape key to cancel search box
1 parent f2fb183 commit 3fb0c98

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/components/views/rooms/SearchBar.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ module.exports = React.createClass({
4242
if (e.keyCode === 13) { // on enter...
4343
this.onSearch();
4444
}
45+
if (e.keyCode === 27) { // escape...
46+
this.props.onCancelClick();
47+
}
4548
},
4649

4750
onSearch: function() {

0 commit comments

Comments
 (0)