element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.28k stars 2.02k forks source link

Attempting to autofill a command/emoji quickly will cause a user to be autofilled instead #9757

Open aaronraimist opened 5 years ago

aaronraimist commented 5 years ago

Description

If I type /devtab quickly in an attempt to get to /devtools, Riot autofills some user in the room instead of autofilling the command. First mentioned in #6993 (which seems to be fixed 😄).

Steps to reproduce

  1. Open a room with a user who's username starts with d
  2. Type /dtab

Log: not sent

Screen Shot 2019-05-17 at 6 11 37 PM

Version information

For the web app:

yannicka commented 3 years ago

I am not sure if this problem still exists. :thinking:

SimonBrandner commented 3 years ago

Yes it does :(

yannicka commented 3 years ago

When I type /d<tab> it autocompletes /ddg (and when I type /dev<tab> it autocompletes /devtools). And I'm in a room where there is a user whose username begins with "d".

aaronraimist commented 3 years ago

Doing it quickly is the key. I can definitely still reproduce.

yannicka commented 3 years ago

Oh yes, if you do this quickly enough, there is the problem. ^^'

Peque commented 3 years ago

I can reproduce too with emojis. :+1:

ell1e commented 2 years ago

Since my ticket was closed in favor of this one, let me suggest the additional points that aren't listed here yet (edit: apparently that's simply a bug, see next comment):

IMHO emoji autocomplete should be : and username autocomplete should only be via @ since this is how it works for all other messengers I've ever used (Telegram, Discord, if I recall Wire Messenger as well). Right now, typing : seems to also autocomplete usernames, but this seems bad to me since if someone using Element is going by muscle memory (as most people will for emojis) then this will mess things up if a user with a name similar to an emoji name is around. Also, @ already exists for that, and the usernames in the auto-complete popup even are listed with @ at the start, so one could argue that : can even autocomplete them is inconsistent even if it had no other disadvantages.

Also, sometimes when doing the auto-complete too fast it seems to do nothing at all. (Popup didn't even open yet, and then the "tab" completion confirm keypress is simply ignored.) This also shouldn't happen IMHO.

t3chguy commented 2 years ago

@ell1e that's simply a bug and doesn't happen if you go slower, hence this issue.

Flexmaen commented 11 months ago

I also add my points since they were not mentioned here:

  1. I wrote :-D
  2. I pressed enter.
  3. I got ✌️

Other Smileys like :-) ;-) ;-D work, but the same problem with :-O and :-P - so I guess everything containing a letter triggers the pop-up emoji window that will turn your input into something different then.

It helped when I also disabled "Enable Emoji suggestions while typing", but still this is a bug, because:

If you continue writing, the smiley won't be replaced. But usually you put the smileys on the end of the line and so when pressing enter afterwards it get's replaced then.