Skip to content

Keep focus after completing input #79

Open

Description

@a-bradaric

Hi,

great app, love using it!

I'm wondering if it's possible to remain focused on the input after putting in the last number/character. The use case I have is that I'm wrapping the control inside a form and using (ngSubmit) to trigger a button's submit action, essentially enabling the users to utilize their enter buttons.
However, that only works if the input remains focused.

Is there a property I'm missing here? Or do I need a custom solution?

Edit:
The solution I'm currently using is to listen to the complete event and then programmatically focus the code input field thus enabling ngSubmit. I reckon that's probably the way to go.

Activity

  1. AlexMiniApps commented on Jun 13, 2022

    @AlexMiniApps
    Owner

    Hi @a-bradaric Thank you for the good words!

    The use case I have is that I'm wrapping the control inside a form and using (ngSubmit) to trigger a button's submit action, essentially enabling the users to utilize their enter buttons.

    It is interesting case, I will add a setting for it!

  2. Thomas-Schindler commented on Aug 20, 2024

    @Thomas-Schindler

    Hi,

    I really like this library as well. And I want to achieve the same behaviour as @a-bradaric described it. First I thought the "isFocusingOnLastByClickIfFilled" property will do the job, but then I realized that this is only used when clicking on the input component and all digits are filled.

    I will implement @a-bradaric solution as well, but I would appreciate a solution with an additional property.

    Thank you for this lib!

  3. AlexMiniApps commented on Aug 23, 2024

    @AlexMiniApps
    Owner

    Hi @Thomas-Schindler, thanks for the good review! I will add this setting, but later. I hope @a-bradaric solution temporarily covers your requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions