Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Slider: when handles overlap, clicking and dragging will now pick the last... #820

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

jpka commented Nov 14, 2012

...one that was moved. Fixed #3467 - Sliders Handles can overlap, only small sliver of slider is selectable

Turns out the z-index didn't have anything to do with how handles are picked upon mouse click, so I just stored the last one moved, and on _mouseCapture, if they overlap, the last one moved wins. It's a minimal change and it works. I also removed the #3736 fix because it becomes irrelevant with this change.

Member

mikesherov commented Nov 14, 2012

@jpka, Thanks again for following up here! Can you please add unit tests for this showing it fixes 3467, and that it doesn't regress for 3736. Also, if you haven't already, please sign the CLA so we can accept your patch! http://jquery.github.com/cla.html

Contributor

jpka commented Nov 14, 2012

@mikesherov: Where I should include those tests? slider_core.js ? the other test files seem to be pretty specific in their scope.

Member

mikesherov commented Nov 14, 2012

I would imagine it goes in slider_events.js, as its related to behavior changes on a specific event, but core would be acceptable if you feel otherwise :)

Owner

scottgonzalez commented Nov 14, 2012

It could go in either file. The events file is about the events being fired by the slider and the core file is about general functionality. Since we're testing which handle is being activated, it could really go in either place, since the activation results in an event and the event will tell us which handle was activated.

@jpka jpka Slider: when handles overlap, clicking and dragging will now pick the…
… last one that was moved. Fixed #3467 - Sliders Handles can overlap, only small sliver of slider is selectable
eed8062
Contributor

jpka commented Nov 15, 2012

Alright, I signed the CLA and amended the commit with tests. I hope you'll find them to your liking :).

Member

mikesherov commented Nov 16, 2012

Thanks! Landed in a188632

@mikesherov mikesherov closed this Nov 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment