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

Don't focus autocomplete item without mouse movement #171

Open
nik312123 opened this issue Apr 27, 2022 · 0 comments
Open

Don't focus autocomplete item without mouse movement #171

nik312123 opened this issue Apr 27, 2022 · 0 comments

Comments

@nik312123
Copy link

nik312123 commented Apr 27, 2022

Situation:

Assume that the user just has the mouse on the screen but is not using it. The user tries to add a tag that has at least one autocompletion suggestion. The user hits the enter key to add their tag (not any of the autocompletion suggestions) only to find one of the suggested autocompletion suggestions added.

This is because their mouse, which was still, was hovering over one of the autocompletion suggestions, making it be selected instead.

With quite a few operating systems (e.g. macOS), the mouse hides itself if the mouse is not in use and the user is using the keyboard (e.g. typing). So, it is highly confusing when a suggested tag is being focused and chosen instead of the typed tag as the mouse is not visible. Even if the mouse is visible, you usually only see such UI elements being focused on if there is at least a little mouse movement inside them.

My recommendation is to require mouse movement onto/within an autocompletion suggestion before providing it focus.

Although, I am unable to understand how this is implemented in vue-tags-input, there is a way to do this with mouse events in JS. The correct way is using onmousemove instead of onmouseenter or onmouseover. (This would be used in conjunction with onmouseleave to remove focus from the autocompletion suggestion when not hovering over the tag.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant