angularjs-slider icon indicating copy to clipboard operation
angularjs-slider copied to clipboard

draggableRange allows to drag into restricted regions

Open sebakerckhof opened this issue 7 years ago • 2 comments

Steps to reproduce

  1. Have a slider with a restricted region and draggableRange set to true
  2. Drag the slider bar

Demo: http://jsfiddle.net/xk5tmq64/

Expected behaviour

You can't drag in the restricted region

Actual behaviour

You can drag into the restricted region, ending up with invalid values.

sebakerckhof avatar Sep 26 '18 15:09 sebakerckhof

you could detect when user stopped using the UI event, then evaluate if any of the two values is inside the forbidden area, and whether the first can be at the lowest in range, else move it to the highest and do the same with the second value.

it must be solved from the library, but this way you can work while it gets solved.

carlosen14 avatar Dec 27 '18 18:12 carlosen14

I've missed this issue 3 months ago. Indeed this should be pretty simple to handle this as part of the library. This behavior is actually a bug.

However, I'll probably won't have the time to implement a fix. I could provide some guidance if someone wants to submit a PR though 🙂

ValentinH avatar Dec 28 '18 11:12 ValentinH