Skip to content

Commit 52a1192

Browse files
committed
Cancel quick-search on Escape, clearing it and returning focus to composer.
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent ddd12ed commit 52a1192

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/components/structures/SearchBox.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ module.exports = React.createClass({
100100
}
101101

102102
switch (ev.keyCode) {
103+
case KeyCode.ESCAPE:
104+
this._clearSearch();
105+
dis.dispatch({action: 'focus_composer'});
106+
break;
103107
case KeyCode.KEY_K:
104108
if (ctrlCmdOnly) {
105109
if (this.refs.search) {

0 commit comments

Comments
 (0)