Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing "Enter" when autocompleting should autocomplete, not send message #4721

Closed
lampholder opened this issue Aug 1, 2017 · 5 comments · Fixed by matrix-org/matrix-react-sdk#2968
Labels
P2 X-Blocked Z-Community-PR Issue is solved by a community member's PR

Comments

@lampholder
Copy link
Member

lampholder commented Aug 1, 2017

Maybe it should do that? I found its just sending the message a bit surprising.

@sr229
Copy link

sr229 commented Aug 2, 2017

doesn't look like intended? it should confirm first just in case the user wants to extend the message with the picked suggestion.

@lukebarnard1
Copy link
Contributor

I think it makes sense to have enter cause the completion to be inserted.

@smithfred
Copy link

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.

@lukebarnard1 lukebarnard1 changed the title Perhaps 'enter' when picking a suggestion from RTE autocomplete should just confirm the selection and not send the message? Pressing "Enter" when autocompleting should autocomplete, not send message Dec 9, 2017
@t3chguy
Copy link
Member

t3chguy commented Dec 9, 2017

I did a thing to fix this but it makes #4872 worse as :p [RETURN] yields 🐷

@npny
Copy link

npny commented May 14, 2019

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: matrix-org/matrix-react-sdk#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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 X-Blocked Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants