mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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
This commit is contained in:
parent
5b4c04acb5
commit
e780583694
15
ui/jquery.ui.selectable.js
vendored
15
ui/jquery.ui.selectable.js
vendored
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user