Skip to content

Smarter Handle Selection #114

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

ednark
Copy link

@ednark ednark commented Feb 10, 2011

Bugs #3736 and #3467 both seem to be related to handle selection. When handle values or positions overlap there may be confusion about the intended Handle to move. I added logic to defer the selection from mouse-down to mouse-move when mouse-down happens over the colliding parts of two or more handles. I added logic to choose the "best" handle when the handle values overlap and a mouse-click event is interpreted. Previously it was always choosing the first (bottom-most) handle on same-value mouse-click events, which explains the can-only-move-bottom-handle on overlap behavior. These changes should allow smart-selection from an arbitrary number of colliding handles, not just two. All other existing slider behaviors (such as not sliding past your neighbor) stay the same. The fix turned into more than just a few tweaked lines as I needed to store a list of overlapping handles and the original event as well as refer to the slider's orientation to help determine what to do. Works like a charm though!

As an added bonus, there is now enough info available to "swap" sliders as you move a handle pass a neighbor, so you could "pass" a neighbor without reordering the handles themselves, though this is not implemented.

…ap by deferring choice until Move. #3736/3467 - some handles get stuck when using two or more handles
@rdworth
Copy link
Contributor

rdworth commented May 26, 2011

I have closed #3736 as I'm not able to reproduce it.

As for #3467, this commit does not address any of the issues discussed in http://groups.google.com/group/jquery-ui-dev/browse_thread/thread/9616d505e8468009 ( linked to from http://bugs.jqueryui.com/ticket/3467#comment:8 )

@rdworth rdworth closed this May 26, 2011
thg2k pushed a commit to thg2k/jquery-ui that referenced this pull request May 31, 2011
Support for non-Latin typeahead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants