Skip to content

Commit

Permalink
Selectable: modified _mouseStart function to unselect event.target if…
Browse files Browse the repository at this point in the history
… the

Ctrl/Cmd key is pressed, and target is selected. Fixed #4293 - Ctrl + Click on 
selected list item does not deselect
  • Loading branch information
jaysoo authored and rdworth committed May 12, 2010
1 parent 5b4c04a commit e780583
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ui/jquery.ui.selectable.js
@@ -1,3 +1,4 @@

/*
* jQuery UI Selectable @VERSION
*
Expand Down Expand Up @@ -128,10 +129,16 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.unselecting = !doSelect;
selectee.selecting = doSelect;
selectee.selected = doSelect;
// selectable UNSELECTING callback
self._trigger(doSelect ? "selecting" : "unselecting", event, {
selecting: selectee.element
});
// selectable (UN)SELECTING callback
if (doSelect) {
self._trigger("selecting", event, {
selecting: selectee.element
});
} else {
self._trigger("unselecting", event, {
unselecting: selectee.element
});
}
return false;
}
});
Expand Down

0 comments on commit e780583

Please sign in to comment.