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

auto select first input when click & empty #62

Closed
rbalet opened this issue Jan 10, 2022 · 2 comments
Closed

auto select first input when click & empty #62

rbalet opened this issue Jan 10, 2022 · 2 comments

Comments

@rbalet
Copy link
Contributor

rbalet commented Jan 10, 2022

Description

When every inputs are empty, do select per default the first one, even if the one selected isn't the first one.

Use case

After analyzing the UX of such input fields, user aren't use to select the first one, but always click somewhere in the center and start to write.
For us, this will sort of always start with the first having to be selected before moving one to the next one.

Idea

I would add a new input field autoSelectFirstInput = true (default being true). SO if someone which they can deactivate this feature.
Default true : Because this is what make the more sense.

Then, on click -> if every inputs are empty -> select first one.

Extended

autoSelectFirstInput could be chance to autoSelectedInputIndex = 0. This would let the user select which one to autoselect. But I cannot see any use case for this.

@AlexMiniApps
Copy link
Owner

@rbalet Hello, have you tired this setting - initialFocusField ?

https://github.com/AlexMiniApps/angular-code-input#component-options

@rbalet
Copy link
Contributor Author

rbalet commented Jan 11, 2022

@AlexMiniApps Sorry, i feel dumb not having see that. Closing the issue

@rbalet rbalet closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants