Skip to content
Permalink
Browse files

Selectable: modified _mouseStart function to unselect event.target if…

… 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 e780583694f69513e4f3759e8b198c18313b8f0c
Showing with 11 additions and 4 deletions.
  1. +11 −4 ui/jquery.ui.selectable.js
@@ -1,3 +1,4 @@

/*
* jQuery UI Selectable @VERSION
*
@@ -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;
}
});

0 comments on commit e780583

Please sign in to comment.
You can’t perform that action at this time.