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

Fix keyboard control for null step with marks #607

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

weijiangan
Copy link

Currently, util.calculateNextValue() incorrectly returns mark object instead of value when steps are disabled (by passing null to step prop) and marks are used

The consequence of this is keyboard navigation will crash the slider due to unhandled errors that stem from unexpected value type.

Steps to reproduce

  1. Pass a marks object as prop to slider component
  2. Pass step = {null} as prop to slider component
  3. Manipulate slider position using arrow keys

calculateNextValue incorrectly returns mark object instead of value when steps are disabled
@codecov
Copy link

codecov bot commented Dec 10, 2019

Codecov Report

Merging #607 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #607   +/-   ##
======================================
  Coverage    95.4%   95.4%           
======================================
  Files           2       2           
  Lines          87      87           
  Branches       29      29           
======================================
  Hits           83      83           
  Misses          4       4
Impacted Files Coverage Δ
src/utils.js 95% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34fca54...4665779. Read the comment docs.

@weijiangan weijiangan changed the title calculateNextValue return key instead of object Fix keyboard control for null step with marks Dec 26, 2019
@yoyo837
Copy link
Member

yoyo837 commented Apr 15, 2023

Rebase please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants