Skip to content

Commit 4fe4e10

Browse files
author
Luke Barnard
committed
Implement the focus_room_filter action
This is for ctrl+k room filtering and switching
1 parent 8987250 commit 4fe4e10

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎src/components/structures/SearchBox.js‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,22 @@ module.exports = React.createClass({
4646
},
4747

4848
onAction: function(payload) {
49-
// Disabling this as I find it really really annoying, and was used to the
50-
// previous behaviour - see https://github.com/vector-im/riot-web/issues/3348
51-
/*
5249
switch (payload.action) {
50+
/* Disabling this as I find it really really annoying, and was used to the
51+
previous behaviour - see https://github.com/vector-im/riot-web/issues/3348
5352
// Clear up the text field when a room is selected.
5453
case 'view_room':
5554
if (this.refs.search) {
5655
this._clearSearch();
5756
}
5857
break;
58+
*/
59+
case 'focus_room_filter':
60+
if (this.refs.search) {
61+
this.refs.search.focus();
62+
}
63+
break;
5964
}
60-
*/
6165
},
6266

6367
onChange: function() {

0 commit comments

Comments
 (0)