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

Unexpected keyboard behavior (in relation to [ Enter ] / [ Return ]): delay and reset of value #116

Open
apboon opened this issue Apr 16, 2021 · 0 comments

Comments

@apboon
Copy link

apboon commented Apr 16, 2021

Expected behavior (as commonly observed for a drop-down):

  1. When the drop-down component has focus, and I press [ Enter ], a list pops up containing options. If the drop-down has a value, the option matching that value is selected in the list.

  2. If I type the first characters of one of the options in the list, the first option matching those characters is selected. The drop-down will reflect what I have selected in the list.

  3. When I then confirm the selected option by pressing [ Enter ], the list closes. The drop-down still reflecting the option I selected.

  4. When I repeat steps 1 to 3, the behavior is the same every time.

Actual behavior:

Initially, the easydropdown drop-down seem to behave as expected. The drop-down opens when pressing [ Enter ]. And if the drop-down already has a value, it shows in the list of options that pops up.

When I type the first option matching those characters is selected (so far so good).

Problem 1:
However, when I press [ Enter ] to confirm the selected option, nothing happens. When I press [ Enter ] a second time, nothing happens. Only after a fixed amount of time (~1000 milliseconds?), the input is finally accepted (maybe the code contains something like setTimeout(function, 1000)?).

Problem 2:
But when I don't change the selection in the list, and just confirm the option that is already selected (using [ Enter ]), the value of the drop-down is cleared.
So basically, if the drop-down has a value (let's say "Option 3"), pressing [ Enter ] twice will just clear it.

Some background:
I am a keyboard-type-of-user, and I noticed the behavior on first try.

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