Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
getting css/style attribute 'order' (flex boxes) fails on large numbers #3836
When getting the 'order' (css style) of an element (using jquery's .css() method), the returned number is exponentialized (sp?) for larger numbers, leading to errors when that order needs to be used for computation (e.g. to move items around programmatically).
This seems to occur only for larger numbers, possibly negative numbers. All is well for smaller numbers (e.g. less than 100,000 - but I'm not sure what the actual range is that triggers the problem).
Link to test case
(extracted from actual code so maybe bigger than needs to be for this example - sorry)
Thanks for opening an issue.
There's a lot of code in the test case. Please try to reduce it more in the future by inlining code, e.g. getting rid of the flexOrder method, then removing non-relevant logic & test cases etc.
In this case I was able to see what's going on there, though. We're just returning what
Firefox & Safari don't change the representation of the number. Could you report an issue in the Chrome bug tracker (https://crbug.com/new)? Please link to it from here. Thanks!