material-web icon indicating copy to clipboard operation
material-web copied to clipboard

mwc-slider-range unable to set valueStart greater than the previous valueEnd

Open colscott opened this issue 2 years ago • 0 comments

If the values on the ranged slider are changed, and the new values do not overlap/intersect the previous values, an error is thrown.

To Reproduce Steps to reproduce the behavior:

  1. Go to the slider demo page https://material-components.github.io/material-web/demos/slider/
  2. Using the browser developer tools console run the following together as a single command:
// Reference the discrete ranged slider
const slider = document.querySelector("body > main > div:nth-child(12) > mwc-slider-range");
// previous values are -6 and 9 here we're updating to 11 and 12
slider.valueEnd = 12;
slider.valueStart = 11;
  1. See error "Uncaught (in promise) Error: start thumb value (11) must be <= end thumb value (9) - min range (0)"

colscott avatar Apr 13 '22 20:04 colscott