mirror of https://github.com/vector-im/riot-web
this is a combobox, HOME/END should pertain to the input, not selection
parent
cecf581e04
commit
224ee05b62
|
@ -221,16 +221,6 @@ export default class Dropdown extends React.Component {
|
||||||
highlightedOption: this._prevOption(this.state.highlightedOption),
|
highlightedOption: this._prevOption(this.state.highlightedOption),
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case Key.HOME:
|
|
||||||
this.setState({
|
|
||||||
highlightedOption: this._firstOption(),
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case Key.END:
|
|
||||||
this.setState({
|
|
||||||
highlightedOption: this._lastOption(),
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,16 +268,6 @@ export default class Dropdown extends React.Component {
|
||||||
return keys[(index - 1) % keys.length];
|
return keys[(index - 1) % keys.length];
|
||||||
}
|
}
|
||||||
|
|
||||||
_firstOption() {
|
|
||||||
const keys = Object.keys(this.childrenByKey);
|
|
||||||
return keys[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastOption() {
|
|
||||||
const keys = Object.keys(this.childrenByKey);
|
|
||||||
return keys[keys.length - 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
_scrollIntoView(node) {
|
_scrollIntoView(node) {
|
||||||
if (node) {
|
if (node) {
|
||||||
node.scrollIntoView({
|
node.scrollIntoView({
|
||||||
|
|
Loading…
Reference in New Issue