]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #3169 - Ctrl-Select should use Cmd key on Mac
authorRichard Worth <rdworth@gmail.com>
Wed, 6 Aug 2008 01:47:47 +0000 (01:47 +0000)
committerRichard Worth <rdworth@gmail.com>
Wed, 6 Aug 2008 01:47:47 +0000 (01:47 +0000)
ui/ui.selectable.js

index bcffb8ed8ae4d71265032fb1f067cfd989565a0e..085d9a72d58f6d1c5e5242ce70d85e33bc0abb12 100644 (file)
@@ -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;