You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then every time I tried to spin, the textbox was populated with either 'Infinity' or '-Infinity' depending on whether I tried to spin up or down.
I noticed that in the _doSpin function, if value == null and the step is greater than 0, then value is set to min or max, but if those aren't set, they return the string '-Infinity' or 'Infinity' respectively.
I added a check after that where if value is '-Infinity' or 'Infinity' then set value to 0.
The resulting behavior is that if I have an empty (null) spinner that has a step value, and I attempt to spin in either direction, it succesfully beings to spin from 0.
So far I haven't seen any issues with this change, but I'm not sure if this is the right way to address the problem.
The text was updated successfully, but these errors were encountered:
I noticed some interesting behavior and I was not sure if it was intended/by design or if it was a defect.
If I created a spinner that allowed nulls, had a step value, but did not have a min or a max:
$('#mySpinner').spinner( { increment: 'fast', allowNull: true, step: 0.001 });
then every time I tried to spin, the textbox was populated with either 'Infinity' or '-Infinity' depending on whether I tried to spin up or down.
I noticed that in the _doSpin function, if value == null and the step is greater than 0, then value is set to min or max, but if those aren't set, they return the string '-Infinity' or 'Infinity' respectively.
I added a check after that where if value is '-Infinity' or 'Infinity' then set value to 0.
The resulting behavior is that if I have an empty (null) spinner that has a step value, and I attempt to spin in either direction, it succesfully beings to spin from 0.
So far I haven't seen any issues with this change, but I'm not sure if this is the right way to address the problem.
The text was updated successfully, but these errors were encountered: