mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Fixed #3169 - Ctrl-Select should use Cmd key on Mac
This commit is contained in:
parent
b96618367e
commit
1fa98fa332
@ -101,7 +101,7 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
|
||||
this.selectees.filter('.ui-selected').each(function() {
|
||||
var selectee = $.data(this, "selectable-item");
|
||||
selectee.startselected = true;
|
||||
if (!e.ctrlKey) {
|
||||
if (!e.metaKey) {
|
||||
selectee.$element.removeClass('ui-selected');
|
||||
selectee.selected = false;
|
||||
selectee.$element.addClass('ui-unselecting');
|
||||
@ -170,7 +170,7 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
|
||||
} else {
|
||||
// UNSELECT
|
||||
if (selectee.selecting) {
|
||||
if (e.ctrlKey && selectee.startselected) {
|
||||
if (e.metaKey && selectee.startselected) {
|
||||
selectee.$element.removeClass('ui-selecting');
|
||||
selectee.selecting = false;
|
||||
selectee.$element.addClass('ui-selected');
|
||||
@ -191,7 +191,7 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
|
||||
}
|
||||
}
|
||||
if (selectee.selected) {
|
||||
if (!e.ctrlKey && !selectee.startselected) {
|
||||
if (!e.metaKey && !selectee.startselected) {
|
||||
selectee.$element.removeClass('ui-selected');
|
||||
selectee.selected = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user