Open Bug 1229368 Opened 9 years ago Updated 2 years ago

Firefox 38 parseFloat behaviour

Categories

(Firefox :: General, defect)

38 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: trebaol.gwenael, Unassigned)

Details

(Whiteboard: [specification][type:bug][2016-GBT-Y])

What did you do? ================ 1. Used parseFloat function in an Angular Directive  What happened? ============== I was having some trouble with firefox 38 html5 validation popping a $error.max on an input type number. Only to realize that the parseFloat function I used in my directive was the reason of this validation error. The function I use : parseFloat(viewValue.replace(',', '.')); The value returned based on the input value : 10.3 : 10.3 10.32 : 10.32 10.321 : 10321 10.3211 : 10.3211 When the input value is 10.321, the parseFloat gives me back the value 10321 !! What should have happened? ========================== The parseFloat function should have transform the value 10.321 into 10.321. Is there anything else we should know? ====================================== Firefox 38, angular 1.4.6, http://pastebin.com/VEZGnZ2C
OS: Other → Linux
Product: Mozilla Developer Network → Firefox
Hardware: All → x86_64
Version: unspecified → 38 Branch
Whiteboard: [specification][type:bug] → [specification][type:bug][2016-GBT-Y]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.