forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(input): fix
step
validation for input[type=number/range]
Previously, the validation would incorrectly fail in certain cases (e.g. `step: 0.01`, `value: 1.16 or 20.1`), due to Floating Point Arithmetic limitations. The previous fix for FPA limitations (081d06f) tried to solve the issue by converting the numbers to integers, before doing the actual calculation, but it failed to account for cases where the conversion itself returned non-integer values (again due to FPA limitations). This commit fixes it by ensuring that the values used in the final calculation are always integers. Fixes angular#15504 Closes angular#15506
- Loading branch information
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters