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

Improve “type to focus” behavior #170

Closed
jouni opened this issue Oct 18, 2018 · 11 comments
Closed

Improve “type to focus” behavior #170

jouni opened this issue Oct 18, 2018 · 11 comments

Comments

@jouni
Copy link
Member

jouni commented Oct 18, 2018

Description

The user should be able to focus an item by typing some of the first letters of its textual representation (just like with the native <select>).

Currently, it is only possible to focus an item by typing the first letter of it, and subsequent letters focus other items.

Live Demo

https://vaadin.com/components/vaadin-dropdown-menu/html-examples/dropdown-menu-basic-demos

@mstahv
Copy link
Member

mstahv commented Oct 18, 2018

I can't even make the "first letter typing" work.

@limonte
Copy link
Contributor

limonte commented Oct 18, 2018

I can't even make the "first letter typing" work.

Yeah, it currently works differently from the native input. A user need to open the overlay by pressing Enter or Space and only then it'll be possible to type the first letter.

@mstahv
Copy link
Member

mstahv commented Oct 18, 2018

Nope, can't make it work :-(

screenflick movie 46

@jouni
Copy link
Member Author

jouni commented Oct 19, 2018

@limonte true, good addition 👍

@mstahv works for me on Safari, Chrome, and Firefox os macOS.

@jouni
Copy link
Member Author

jouni commented Oct 19, 2018

Oh, now I see it. It only works with lowercase letters, not if you use Shift 🙄

@mstahv
Copy link
Member

mstahv commented Oct 19, 2018

Yep, that's it.

In the example the first letter is upper case, so it naturally typed it in upper case. It might be that it is just me, but I'd say it is quite common to start with capitals if the options start with capitals.

@mstahv
Copy link
Member

mstahv commented Oct 19, 2018

And yes, if there is a focus in the field and I start typing some option, I'd expect to be able to select an option right away.

@limonte
Copy link
Contributor

limonte commented Oct 23, 2018

Oh, now I see it. It only works with lowercase letters, not if you use Shift 🙄

This is fixed in the latest stable, proof: https://lavender-bolt.glitch.me/

@johannesh2
Copy link

johannesh2 commented Feb 15, 2019

I would expect that the value can be selected without opening the overlay by just typing when the focus is on the field. Is this ticket about it or should I create another one? Feel free to close #184 if it's a duplicate of this.

@jouni
Copy link
Member Author

jouni commented Feb 15, 2019

They are related but slightly different. I would keep both open.

@web-padawan
Copy link
Member

Fixed by vaadin/vaadin-list-mixin#50 and released as vaadin-list-mixin 2.2.0 🎉

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

5 participants