You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
fix: allow up/down normally for no completions
Autocomplete current eats up up/down key events by unconditionally returning true for onUpArrow and onDownArrow. Instead, only do that if there are completions actually visible.
This commit is contained in:
@@ -503,18 +503,14 @@ export default class MessageComposerInput extends React.Component {
|
||||
}
|
||||
|
||||
onUpArrow(e) {
|
||||
if(this.props.onUpArrow) {
|
||||
if(this.props.onUpArrow()) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (this.props.onUpArrow && this.props.onUpArrow()) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
onDownArrow(e) {
|
||||
if(this.props.onDownArrow) {
|
||||
if(this.props.onDownArrow()) {
|
||||
e.preventDefault();
|
||||
}
|
||||
if (this.props.onDownArrow && this.props.onDownArrow()) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user