mirror of https://github.com/vector-im/riot-web
clear the searchbox after quick-search
parent
8f20fcfa6b
commit
ddd12edc06
|
@ -164,10 +164,11 @@ var RoomSubList = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onRoomTileClick(roomId) {
|
onRoomTileClick(roomId, ev) {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: roomId,
|
room_id: roomId,
|
||||||
|
clear_search: (ev && (ev.keyCode == 13 || ev.keyCode == 32)),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -48,18 +48,14 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onAction: function(payload) {
|
onAction: function(payload) {
|
||||||
// Disabling this as I find it really really annoying, and was used to the
|
|
||||||
// previous behaviour - see https://github.com/vector-im/riot-web/issues/3348
|
|
||||||
/*
|
|
||||||
switch (payload.action) {
|
switch (payload.action) {
|
||||||
// Clear up the text field when a room is selected.
|
// Clear up the text field when a room is selected.
|
||||||
case 'view_room':
|
case 'view_room':
|
||||||
if (this.refs.search) {
|
if (payload.clear_search && this.refs.search) {
|
||||||
this._clearSearch();
|
this._clearSearch();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange: function() {
|
onChange: function() {
|
||||||
|
|
Loading…
Reference in New Issue