mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-18 10:51:54 +02:00
dont capture enter to close autocomplete
This commit is contained in:
parent
599fccd9ce
commit
c144edfcac
@ -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…
x
Reference in New Issue
Block a user