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

Range slider issue, when min value is more than max value and also more than aria-valuemax value #395

Closed
karthik2706 opened this issue Feb 5, 2018 · 2 comments

Comments

@karthik2706
Copy link

2018-02-05_18-01-07

@Robin-front
Copy link
Contributor

Robin-front commented Feb 6, 2018

slider/src/Range.jsx

Lines 273 to 287 in c67e422

ensureValueNotConflict(val, { allowCross }) {
const state = this.state || {};
const { handle, bounds } = state;
/* eslint-disable eqeqeq */
if (!allowCross && handle != null) {
if (handle > 0 && val <= bounds[handle - 1]) {
return bounds[handle - 1];
}
if (handle < bounds.length - 1 && val >= bounds[handle + 1]) {
return bounds[handle + 1];
}
}
/* eslint-enable eqeqeq */
return val;
}

Because here has a bug. When you click Apply button, the variable handle is null, so this function will skip condition judge and return the new value 100. But it should actually return 40 for this example.

trace these fixed pr but not yet merge: #304 #379

@yesmeck
Copy link
Member

yesmeck commented Feb 27, 2018

#304 has been merged, try 8.6.1

@yesmeck yesmeck closed this as completed Feb 27, 2018
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

No branches or pull requests

3 participants