From 25698de5c229a026e93e112ed219d1c22dec185e Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Thu, 17 Dec 2009 00:33:23 +0000 Subject: [PATCH] BUGFIX: add check for left mouse button git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@95714 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/CMSMain.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/javascript/CMSMain.js b/javascript/CMSMain.js index 2788c08d..78556dc3 100644 --- a/javascript/CMSMain.js +++ b/javascript/CMSMain.js @@ -244,15 +244,18 @@ * Register the onclick handler that loads the page into EditForm */ $("#SideReportsHolder form ul a").concrete({ - onclick: function() { - var $link = $(this); - $link.addClass('loading'); - jQuery('#Form_EditForm').concrete('ss').loadForm( - $(this).attr('href'), - function(e) { - $link.removeClass('loading'); - } - ); + onclick: function(e) { + if (e.button!=2) { + var $link = $(this); + $link.addClass('loading'); + jQuery('#Form_EditForm').concrete('ss').loadForm( + $(this).attr('href'), + function(e) { + $link.removeClass('loading'); + } + ); + } + return false; } });