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

decimal stepping not working (like normal input number one) #79

Closed
simon387 opened this issue Sep 9, 2020 · 2 comments
Closed

decimal stepping not working (like normal input number one) #79

simon387 opened this issue Sep 9, 2020 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@simon387
Copy link

simon387 commented Sep 9, 2020

if I have 1.01 and add 1 with stepper, the result is 2.00 and not 2.01

@shaack
Copy link
Owner

shaack commented Sep 9, 2020

That's right, the stepping algorithm needs to be revised at this point. Specification: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

"Only values which are equal to the basis for stepping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid."

and

Note: When the data entered by the user doesn't adhere to the stepping configuration, the user agent may round to the nearest valid value, preferring numbers in the positive direction when there are two equally close options.

So, if "value" (or "min") was set to "1.01" the stepper should step to "2.01".

...but: If "min" and "value" was not set, or set to „0“, the behaviour is correct as it works.

@shaack shaack added bug Something isn't working duplicate This issue or pull request already exists labels Sep 9, 2020
@shaack
Copy link
Owner

shaack commented Sep 13, 2020

Duplicate, see #56

@shaack shaack closed this as completed Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants