-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
UX inconsistency: allowInputToggle
does not open picker on tab-navigation focus as well
#2575
Comments
the option name is allowInputToggle. I guess it makes more sense if I rename it to |
Tabbing to a field is quite a usual user behaviour, especially when there a fair number of fields. The behaviour that I think would be good to have is that if the user tabs to the input (or any focus mechanism really), then the picker opens if it's not already open and closes if both the input and the picker lose focus. |
This issue also arises when using client side validation. The browser will put focus on a required date field, and the date picker should open for that field. |
Hello, please check this StackBlitz |
* #2575 open on focus * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * repl improvements * repl improvements * repl improvements * repl improvements --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]>
* #2575 open on focus * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * repl improvements * repl improvements * repl improvements * repl improvements --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]>
* #2791 more tests * #2791 more tests * #2791 more tests * #2757 should fix start of the week (#2818) * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * #2575 open on focus (#2832) * #2575 open on focus * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * repl improvements * repl improvements * repl improvements * repl improvements --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]> * #2621 potential fix (#2833) --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]>
* #2575 open on focus * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * repl improvements * repl improvements * repl improvements * repl improvements --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]>
* #2791 more tests * #2791 more tests * #2791 more tests * #2757 should fix start of the week (#2818) * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * #2575 open on focus (#2832) * #2575 open on focus * Add type attribute to meridiem button (#2822) Resolves #2820 * repl improvements * repl improvements * Fix typo in Finnish locale (fi.ts) (#2824) Renamed Edelline -> Edellinen * repl improvements * repl improvements * repl improvements * repl improvements --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]> * #2621 potential fix (#2833) --------- Co-authored-by: axunonb <[email protected]> Co-authored-by: Pertti Roitto <[email protected]>
This has been released |
This PR seems to break the The picker only opens on every second click on the input field. Please check this StackBlitz. |
I installed
v6.0.0b7
.The relevant stackblitz is here (
@master
).tl;dr: If a website teaches me that a click opens the picker, my mind remembers this as “focusing the input field opens the picker”, but focusing via tab-navigation does not do that. This is unexpected.
Not clear whether UX bug (inconsistency) or feature request, but my reasoning is as follows.
The
allowInputToggle: true
option actually teaches the user not one, but two pieces of functionality:However, for input fields, while the specific action of a user might be a click, the intention behind that is to enter some data, i.e. we're actually trying to focus the element. Note that this is in contrast to other elements (such as links / buttons), where the intention often rather is to trigger an action.
Regarding feature 2, this is somewhat separate, and may potentially not even be discovered by some people, for instance if they are used to clicking anywhere else on the page or pressing
escape
.So the fact that this actually is a toggle is more of an implementation detail than a defining feature of this option.
…Back to feature 1. If our intent is to focus the element, we might as well do this with a tab navigation. More precisely, my internal workflow when using forms is this:
These are two sides of the same coin, so IMO opening the picker in one case and not the other is unexpected behavior.
The text was updated successfully, but these errors were encountered: