mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Oops, onChange doesn't catch the enter key
This commit is contained in:
parent
d0618c4f49
commit
53fd3f52fa
@ -215,9 +215,6 @@ module.exports = React.createClass({
|
||||
onFilterChange: function(ev) {
|
||||
const alias = ev.target.value;
|
||||
|
||||
if (ev.key == "Enter") {
|
||||
this.showRoomAlias(alias);
|
||||
} else {
|
||||
this.filterString = alias || null;
|
||||
|
||||
// don't send the request for a little bit,
|
||||
@ -231,6 +228,11 @@ module.exports = React.createClass({
|
||||
this.filterTimeout = null;
|
||||
this.refreshRoomList();
|
||||
}, 300);
|
||||
},
|
||||
|
||||
onFilterKeyUp: function(ev) {
|
||||
if (ev.key == "Enter") {
|
||||
this.showRoomAlias(ev.target.value);
|
||||
}
|
||||
},
|
||||
|
||||
@ -397,7 +399,7 @@ module.exports = React.createClass({
|
||||
<div className="mx_RoomDirectory_list">
|
||||
<div className="mx_RoomDirectory_listheader">
|
||||
<input type="text" placeholder="Find a room by keyword or room ID (#foo:matrix.org)"
|
||||
className="mx_RoomDirectory_input" size="64" onChange={this.onFilterChange}
|
||||
className="mx_RoomDirectory_input" size="64" onChange={this.onFilterChange} onKeyUp={this.onFilterKeyUp}
|
||||
/>
|
||||
<NetworkDropdown config={this.props.config} onNetworkChange={this.onNetworkChange} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user