dont capture enter to close autocomplete
This commit is contained in:
parent
599fccd9ce
commit
c144edfcac
1 changed files with 0 additions and 8 deletions
|
@ -245,14 +245,6 @@ export default class BasicMessageEditor extends React.Component {
|
||||||
if (model.autoComplete) {
|
if (model.autoComplete) {
|
||||||
const autoComplete = model.autoComplete;
|
const autoComplete = model.autoComplete;
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case "Enter":
|
|
||||||
// only capture enter when something is selected in the list,
|
|
||||||
// otherwise don't handle so the contents of the composer gets sent
|
|
||||||
if (autoComplete.hasSelection()) {
|
|
||||||
autoComplete.onEnter(event);
|
|
||||||
handled = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "ArrowUp":
|
case "ArrowUp":
|
||||||
autoComplete.onUpArrow(event);
|
autoComplete.onUpArrow(event);
|
||||||
handled = true;
|
handled = true;
|
||||||
|
|
Loading…
Reference in a new issue