mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
Fix dropdown keyboard accessibility when filter is disabled
This commit is contained in:
parent
41475a3b94
commit
54fb24f359
1 changed files with 2 additions and 3 deletions
|
@ -204,7 +204,7 @@ export default class Dropdown extends React.Component<IProps, IState> {
|
|||
this.props.onOptionChange(dropdownKey);
|
||||
};
|
||||
|
||||
private onInputKeyDown = (e: React.KeyboardEvent) => {
|
||||
private onKeyDown = (e: React.KeyboardEvent) => {
|
||||
let handled = true;
|
||||
|
||||
// These keys don't generate keypress events and so needs to be on keyup
|
||||
|
@ -320,7 +320,6 @@ export default class Dropdown extends React.Component<IProps, IState> {
|
|||
type="text"
|
||||
autoFocus={true}
|
||||
className="mx_Dropdown_option"
|
||||
onKeyDown={this.onInputKeyDown}
|
||||
onChange={this.onInputChange}
|
||||
value={this.state.searchQuery}
|
||||
role="combobox"
|
||||
|
@ -358,7 +357,7 @@ export default class Dropdown extends React.Component<IProps, IState> {
|
|||
|
||||
// Note the menu sits inside the AccessibleButton div so it's anchored
|
||||
// to the input, but overflows below it. The root contains both.
|
||||
return <div className={classnames(dropdownClasses)} ref={this.collectRoot}>
|
||||
return <div className={classnames(dropdownClasses)} ref={this.collectRoot} onKeyDown={this.onKeyDown}>
|
||||
<AccessibleButton
|
||||
className="mx_Dropdown_input mx_no_textinput"
|
||||
onClick={this.onInputClick}
|
||||
|
|
Loading…
Reference in a new issue