Skip to content

Range Slider Step with a Float Issue #95

Open
@mshvarts

Description

@mshvarts

Slider Range doesn't work if I have a float step.

It broke my code, I had to step to set step to 1 or use a workaround and initialize the slider with slider( step: 0.5 ) myself to fix it.

I tried to find the bug in the code and saw parseFloat("0.5", 10) being used

 function getSafeFloat(value, defaultValue) {
      var parsedValue = parseFloat(value, 10);
      return isNaN(parsedValue) ? defaultValue : parsedValue;
    }

parseFloat should only accept one argument, but it should still work because it should ignore the second parameter, so maybe the problem is somewhere else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions