Skip to content

Commit

Permalink
Merge pull request #3680 from t3chguy/t3chguy/escape_cancel_search_fo…
Browse files Browse the repository at this point in the history
…cus_composer

Cancel quicksearch on ESC
  • Loading branch information
ara4n authored Apr 21, 2017
2 parents ddd12ed + 52a1192 commit 9c27075
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/structures/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9c27075

Please sign in to comment.