Skip to main content

Search and Top Navigation

#4387 closed feature (wontfix)

Opened March 22, 2009 12:56AM UTC

Closed March 26, 2015 01:23PM UTC

slider handles can be dragged over each other when there are more than 2

Reported by: vitch Owned by:
Priority: major Milestone: none
Component: ui.slider Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

There is logic in the slider which deals with making sure that you don't drag the handles past each other when there is 2 handles. However, where there are more than two handles this logic breaks. The first two handles can't be dragged past each other but all subsequent handles can be.

Attachments (1)
  • ui.slider.4387.diff (1.2 KB) - added by vitch March 22, 2009 01:10AM UTC.

    Patch including fix for problem

Change History (11)

Changed March 22, 2009 04:58AM UTC by vitch comment:1

Changed March 22, 2009 12:23PM UTC by rdworth comment:2

resolution: → invalid
status: newclosed

The current behavior is as designed. If range is false, handle values don't affect eachother. If range is true, only two handles are supported. This wasn't entirely clear in the specs, so I've updated them. See:


  • in the case of one handle, the slider min/max are min/max for the handle
  • in the case of two handles, and range true, each handle's min/max is set by the current value of other handle. The first handle's min is the slider min. The last handle's max is the slider max
  • if there are more than two handles, or range is false, the slider min/max are min/max for each handle
  • range: true only works with two handles
  • range: 'min' and range: 'max' only work with one handle


Changed March 22, 2009 06:15PM UTC by vitch comment:3

I'd argue that the spec should be rethought then. I think it's important to have an option where the handles can't be dragged past each other - it's what I needed and expected in my case. And the logic in my patch handles this more gracefully than the existing code.

To allow for the requirement from the spec I would suggest adding another optional parameter - "handlesCanPass" (but with a better name!). It would default to true. When there are two values and range is true it would be forced to false. In other cases it is up to the user which behaviour they want/ need.

Changed March 22, 2009 06:22PM UTC by vitch comment:4

Additionally, if this patch (or a variant) is landed then you will also need to fix some flawed logic around getting the closest handle for mouse iteraction. See my comments and a patch on #3736

Changed July 20, 2009 11:05AM UTC by jzaefferer comment:5

resolution: invalid
status: closedreopened

Changed July 20, 2009 11:07AM UTC by jzaefferer comment:6

milestone: TBD1.8
type: bugfeature

Reopening this as a feature, not a bug. Richard was right to close the bug report (works as designed), but its still a valid feature request.

We at least to provide a way to implement the desired behaviour, even if we don't have direct support. Using the cancellable slide event alone is probably not enough, at it would need more context information (where are the other handles?).

Changed August 23, 2009 04:05PM UTC by jzaefferer comment:7

Duplicate of #4388?

Changed October 11, 2012 02:53PM UTC by scottgonzalez comment:8


Changed October 27, 2012 08:19PM UTC by mikesherov comment:9

status: reopenedopen

Changed June 24, 2014 11:54PM UTC by scottgonzalez comment:10

milestone: 1.11.0none

Changed March 26, 2015 01:23PM UTC by scottgonzalez comment:11

resolution: → wontfix
status: openclosed

Now that #7630 is implemented, this is very easy to do in the slide event:

I don't think we should be adding another option at this point.