jquery/jquery-ui — pull request #1208 by epowers (2014-03-06 20:38:49+00:00)
Title: Selectable: fix mousedown on hierarchical selectable items.

Fixes a problem with selecting parents in selectable hierarchies. Using .parents().addBack() resulted in an array of elements where the target element was added to the end. Clicking directly on a child selectee would result in a parent being selected.

An alternative (also tested) might be to remove the selfAndParents method and use a jquery ui selector:

git remote add epowers https://github.com/epowers/jquery-ui.git
git checkout epowers/selectable_fix_alt_1

- $(event.target).parents().addBack().each(function() {
+ $(event.target).closest(":data(selectable-item)").each(function() {

Should be faster and I think perform better as it stops traversing up in the closest method.