dont capture enter to close autocomplete

This commit is contained in:
Bruno Windels 2019-08-29 18:39:35 +02:00
parent 599fccd9ce
commit c144edfcac

View file

@ -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;