Skip to content

Issue with numericInput plus update function #145

@HenkWillcock

Description

@HenkWillcock

Encountering an issue where you can't enter all the characters into a field without having to move the cursor around. With this example I can only enter the first 4 characters, then to enter the rest I have the move the cursor to the left.

Here's my input mask using ember's built in mut action which has the issue:

    <OneWayInputMask
      @id="taxNumber"
      @mask='999-999'
      class='docs-border docs-border-grey'
      @value={{this.taxNumber}}
      @update={{action (mut this.taxNumber)}}
      @options={{hash numericInput=true}}
    />

So as an example, the above InputMask only lets you input 1-234 before it gets stuck. This issue only happens with numericInput=true, if it's false, it seems to work OK.

Getting rid of @update and @value removes the issue, but of course now the value doesn't save when you submit the form.

    <OneWayInputMask
      @id="taxNumber"
      @mask='999-999'
      class='docs-border docs-border-grey'
      @options={{hash numericInput=true}}
    />

Any ideas what might be going on here?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions