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

keyboard event doesn't properly handle input selection for decimal numbers #39

Closed
changhuixu opened this issue Jul 17, 2020 · 0 comments

Comments

@changhuixu
Copy link
Owner

For an input element,

<input
      id="dollar-amount"
      type="text"
      name="dollar-amount"
      inputmode="numeric"
      pattern="^(?=.*\d)\d*(\.\d{1,2})?$"
      placeholder="0.00"
      digitOnly
      decimal="true"
    />

If enter 1.35, select all, then enter .25. The input box will have value 25, which is not correct.

changhuixu added a commit that referenced this issue Jul 17, 2020
changhuixu added a commit that referenced this issue Jul 17, 2020
changhuixu added a commit that referenced this issue Jul 17, 2020
fix #39 by cherry-picking #40
v1.9.0 is compatible for projects using Angular versions 6-9
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