Pressing "Enter" when autocompleting should autocomplete, not send message
Maybe it should do that? I found its just sending the message a bit surprising.
doesn't look like intended? it should confirm first just in case the user wants to extend the message with the picked suggestion.
I think it makes sense to have enter cause the completion to be inserted.
I'd say this is more than a "perhaps". The auto-complete pop-up has keyboard grab for arrow keys and Esc; this strongly implies that "Enter" also applies to the pop-up, not the message field.
Additionally:
- sending the message on Enter is not easily/fully reversible (AFAICS - redactions still show up as redacted)
- send on Enter (with the pop-up shown) is only useful for end-of-message completions. Mentions are frequently going to be at the beginning of the message, and emoji will probably be only <= 50% of the time at the end of the message. The additional work to send if "Enter" meant "insert" would just be pressing Enter twice - not a huge burden
- other typed characters (A-z, 0-9, space etc.) could still imply "insert" if desired, since they don't have confused semantics. Though arguably requiring an explicit "Enter" even then would allow the user to just ignore the auto-complete pop-up if they don't actually intend to insert a mention, emoji etc.
I did a thing to fix this but it makes #4872 worse as :p [RETURN] yields 🐷
As laid out above, "confirm autocomplete on enter" seems to make more sense than "send partial message on enter". It also feels more intuitive to me. This has been bugging me for a while so here's a (very straightforward) pull request for it: https://github.com/matrix-org/matrix-react-sdk/pull/2968
(Note: the last PR on this thread from late 2017, not fully functional, and then closed, so I decided I could probably safely go ahead with mine)