Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Slider with fractional values has javascript math error #14455

Closed
2 tasks done
lee-chase opened this issue Aug 17, 2023 · 0 comments · Fixed by #14460
Closed
2 tasks done

[Bug]: Slider with fractional values has javascript math error #14455

lee-chase opened this issue Aug 17, 2023 · 0 comments · Fixed by #14460
Labels
status: needs reproduction Issues lacking a code reproduction type: bug 🐛

Comments

@lee-chase
Copy link
Member

Package

@carbon/react

Browser

Chrome

Package version

1.35.0

React version

18

Description

If the step value is 0.3 and step multiplier 1, range 0 - 100 invalid values can be achieved.

Reproduction/example

N/A

Steps to reproduce

Steps

  1. Drag the handle to 0.
  2. Press up (value now 0.3)
  3. Press up (value now 0.6)
  4. Press up (value now 0.89999999999)

The simplest way to avoid this is to set the value of the input directly in javascript, the immediately read it back to the internally maintained value.

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs reproduction Issues lacking a code reproduction type: bug 🐛
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants