Nehaj86 / jquerysheet

Automatically exported from code.google.com/p/jquerysheet
0 stars 0 forks source link

Process number larger than 123456789123456789 wrong #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. input number 123456789123456789 to a cell.

What is the expected output? What do you see instead?
the number shown is 123456789123456789
but it's 123456789123456780

if the number longer than 123456789123456789, all the last digits are zero.

What version of the product are you using? On what operating system?
All the versions the same.  svn rev 854.

Please provide any additional information below.

Original issue reported on code.google.com by sinoje...@gmail.com on 2 Jun 2013 at 2:37

GoogleCodeExporter commented 9 years ago
This is because :

endOfNumber: false,
encode:function (val) {
    ......
    if (!val.replace) {
        return val || '';
    }
    var num = $.trim(val) * 1;  // ERROR:it changes 123456789123456789123 to 123456789123456780000
    if (!isNaN(num)) {

Original comment by sinoje...@gmail.com on 2 Jun 2013 at 3:31

GoogleCodeExporter commented 9 years ago
Could not reproduce the error

Original comment by gavincre...@gmail.com on 11 Jun 2013 at 2:57

GoogleCodeExporter commented 9 years ago
I use windows 7 + chrome 27 or IE, it reproduced always.
please see attachment gif file.

Original comment by sinoje...@gmail.com on 11 Jun 2013 at 4:34

Attachments:

GoogleCodeExporter commented 9 years ago
I've reproduced the problem. I'm on it.

Original comment by gavincre...@gmail.com on 11 Jun 2013 at 4:56

GoogleCodeExporter commented 9 years ago
The problem lies within the jquery-globalize plugin. I left the report on the 
GitHub page. I created a temporary fix by overriding the encode function.

Original comment by gavincre...@gmail.com on 11 Jun 2013 at 6:28

Attachments: