element-hq / element-web

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

hovering over an emoji in the picker should not activate the autocomplete; surely you should have to click on it #4974

Closed MurzNN closed 7 years ago

MurzNN commented 7 years ago

Even with "Automatically replace plain text Emoji" option disabled - sometimes text is autoreplaced with smileys instantly on typing.

For example, if I type rooms : text in message textarea - this text is auto replaced to rooms ๐Ÿ˜ on typing instantly after pressing : key.

Another example:

lampholder commented 7 years ago

Hey @MurzNN - can you advise what browser/OS you're using and whether you've got any plugins/keyboard remappings etc. in place?

I'm not seeing this, but since pressing : opens the autocomplete popup, what sounds like might be happening is that the autocomplete popup is misinterpreting something as your making a selection.

What is your autocomplete delay set to in user settings?

lampholder commented 7 years ago

Minor p2 just 'cause I haven't heard of this affecting many people - if it's more common then it's more important :)

lampholder commented 7 years ago

Changed my mind - P1 until we know more about what's going on.

MurzNN commented 7 years ago

Firefox 55 web browser on Ubuntu Linux with https://riot.im/develop/ website, without any keyboard plugins. autocomplete delay is 200 ms

MurzNN commented 7 years ago

Now I can't repoduce this after fresh reload of webpage, seems this is effect of some previous actions in DOM.

MurzNN commented 7 years ago

Yeah, reproduced: Open https://riot.im/develop/ , type "test :", select smiley from list via mouse click, after this - continue typing "test ๐Ÿ˜˜ asada rooms :" and after you press last ":" - it will be instantly replaced by smiley "โ˜บ".

t3chguy commented 7 years ago

@MurzNN its because your mouse is still over the autocomplete thing most likely

MurzNN commented 7 years ago

Yes, mouse is still over smileys and they replaced instantly! Will be good to change bahavior to replace them by click only.

elinorbgr commented 7 years ago

Yes, I have the same issue. If the pointer is where the autocomplete appears, whatever emoji is under it is automatically inserted whenever I type :

lukebarnard1 commented 7 years ago

So sometimes in some browsers, a mouse move event is sent when the auto complete dialog appears, even if the mouse doesn't move...

Removing the onMouseOver doesn't feel like the right thing to do, because it's nice to have when you actually move your mouse to select an emoji.

eternaleye commented 7 years ago

@lukebarnard1 I disagree, TBH - not once have I wanted mousing over to replace my input, mostly because the input is the same size as the picker and so I don't really gain anything from it. I'd much prefer if onMouseOver instead showed a larger preview (sticker-sized?) so I could tell what was being selected.

tradej commented 7 years ago

I have this issue in Firefox 54.0.1 on Fedora 26. When the mouse is in the area where the list of emoji will appear when typing (meaning the cursor is there first), the emoji that appears under the cursor is automatically entered when I continue typing.

I second the notion that onMouseOver is not a good action to replace the emoji, and would prefer having to click to replace them.

lukebarnard1 commented 7 years ago

Okay, the consensus seems to be in favour of not inserting the emoji onMouseOver and finding another way to preview the emoji, and I quite like the suggestion from @eternaleye for a "sticker-sized" version of the emoji being previewed. Potentially the preview should only be shown after 1s or whatever.

MurzNN commented 7 years ago

I vote that emoji picker contains only emoji without text, and on hover - show sticker-sized hovered emoji with text implementation.

t3chguy commented 7 years ago

Except it's not only an emoji picker but also autocomplete so if it doesn't have the short names you don't know what to type to filter further

MurzNN commented 7 years ago

With so much items in current unicode emoji list there are easier to select them via mouse (and filter via mouse by categories) instead of remember and typing text implementation. And classic text emoji like ;-) and :) don't need replacement to image.

At now I already don't know what to type, because after : I see only short list if items, so I must divine words to find needed emoji.

Other IM apps don't show text implementation on emoji list, but allow filter list by typing words, for example Slack:

So there are no so much problem to show only Emoji images in list, and show text implementation only on hover (with Sticker-sized emoji preview).

lukebarnard1 commented 7 years ago

@MurzNN that feels like a separate issue. Let's keep discussion of improving the picker (UX) itself to https://github.com/vector-im/riot-web/issues/1107

zzottel commented 7 years ago

The worst problem is that if the mouse happens to be in region where picker list shows up, that emoji is instantly inserted (FF 55). So typing ":-)" while the mouse pointer is somewhere above the text field means some random emoji is inserted.

The same is true for commands: Type /me while the mouse pointer is somewhere above the text field, and some random command is inserted.

anoadragon453 commented 7 years ago

Also getting this in FF 55.02. I like the idea of being to hover over the emojis and see them change, but perhaps only start listening for that after you've moved the mouse after the dialog has appeared, instead of instantly replacing once the dialog comes up.

t3chguy commented 7 years ago

@anoadragon453 that's the intention but https://github.com/vector-im/riot-web/issues/4974#issuecomment-330246244

anoadragon453 commented 7 years ago

@t3chguy Ah, missed that sorry. Seems like you guys have some idea on how to improve the situation, so I'll just wait and keep my mouse to the side for now :P