Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Investigate how discrete slider can allow step values < 1 #1426

Closed
@gjdev

Description

What MDC-Web Version are you using?

0.22.0

What browser(s) is this bug affecting?

All

What OS are you using?

All

What are the steps to reproduce the bug?

  1. Create and initialize a discrete slider
  2. Set step value to e.g. 0.5
  3. The resulting step value will be 1, not 0.5

What is the expected behavior?

A step value of 0.5

What is the actual behavior?

A step value of 1

Any other information you believe would be useful?

if (this.isDiscrete_ && (typeof(step) !== 'number' || step < 1)) {

Explicitly sets the value to 1, when it is < 1.

This is in contradiction with the documentation (README) which says: "The step value can be any positive floating-point number", and "Discrete sliders are required to have a positive step value other than 0".

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.backlogbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions