From f4f00e30fda2d149a256a328fcac8276c34d54bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <f.schaefer@finn.de>
Date: Fri, 18 Feb 2011 10:42:44 +0100
Subject: [PATCH] Allow issue multiselect on Mac. #178

Contributed by Simon COURTOIS
---
 public/javascripts/context_menu.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/javascripts/context_menu.js b/public/javascripts/context_menu.js
index 4bb73eec7..2e582d969 100644
--- a/public/javascripts/context_menu.js
+++ b/public/javascripts/context_menu.js
@@ -40,7 +40,7 @@ ContextMenu.prototype = {
   	this.hideMenu();
   	if (Event.element(e).tagName == 'A') { return; }
     if (window.opera && e.altKey) {	return; }
-    if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {      
+    if (!Event.isRightClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {      
       var tr = Event.findElement(e, 'tr');
       if (tr!=null && tr!=document && tr.hasClassName('hascontextmenu')) {
         // a row was clicked, check if the click was on checkbox
@@ -53,7 +53,7 @@ ContextMenu.prototype = {
             tr.removeClassName('context-menu-selection');
           }
         } else {
-          if (e.ctrlKey) {
+          if (e.ctrlKey || e.metaKey) {
             this.toggleSelection(tr);
           } else if (e.shiftKey) {
             if (this.lastSelected != null) {
-- 
GitLab