Skip to main content

Search and Top Navigation

#9411 closed bug (patcheswelcome)

Opened July 01, 2013 12:53PM UTC

Closed July 01, 2013 01:38PM UTC

Can't drag overlapping slider handles even if it's clicked directly

Reported by: Corke Owned by: Corke
Priority: minor Milestone: none
Component: ui.slider Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

If the handles of the slider is modified to not fully overlap you still can't drag the second handle even if you click it directly.

STR:

1. Load http://jsfiddle.net/TXudh/4/

2. Hover the red handle and notice that is becomes green.

3. Try to drag the red(now green) handle without moving the blue one.

Expected result:

The red handle should be movable if it's clicked directly.

Actual result:

Even if you click the red handle directly while on the same value as the blue the blue handle will be dragged.

Attachments (0)
Change History (3)

Changed July 01, 2013 01:03PM UTC by scottgonzalez comment:1

owner: → Corke
status: newpending

Unfortunately this isn't simple to fix. Do you have a suggestion for how to make this work while also making #3467 work?

Changed July 01, 2013 01:27PM UTC by Corke comment:2

status: pendingnew

Ya the draggability, is a though one. We are trying to solve it by adding child elements to the handles and making the original handles very thin. Then through :nth-child(even) position them on the top and bottom of the slider to make them more draggable.

This idea breaks though, cause the slider that._lastChangedValue is used without checking if the handle was clicked directly. And as there is no clean way to override this, i filed this bug.

Though yes, the overlap problem is a hard one, and without changing design I don't really have a good suggestion on how to fix the draggabilioty of the handles. Cause subtracting the width of the handle from the slider would be even worse in my book (we have up to 4 handles and that would break it even worse then the current problem).

Changed July 01, 2013 01:38PM UTC by scottgonzalez comment:3

resolution: → patcheswelcome
status: newclosed

We can't rely on which element was directly clicked, since that breaks a lot more use cases. I'll close as patches welcome in case anyone has any ideas, but I think what we currently have is the best we can do. I'd be happy to accept a pull request which pulls out the logic for which handle to make active so that you can override that yourself.