From 891f9fe52635c0d9714d60fb99308c201bfa4108 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 24 Mar 2016 13:59:23 +0100 Subject: [PATCH] SONAR-7402 provide link to file --- .../details/drilldown/ComponentCell.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js index 558c80219d4..e5e5a3cbb17 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js @@ -29,9 +29,14 @@ const ComponentCell = ({ component, isSelected, onClick }) => { 'selected': isSelected }); - const handleClick = (e) => { - e.preventDefault(); - onClick(); + const handleClick = e => { + const isLeftClickEvent = e.button === 0; + const isModifiedEvent = !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey); + + if (isLeftClickEvent && !isModifiedEvent) { + e.preventDefault(); + onClick(); + } }; const { head, tail } = splitPath(component.path || component.name); @@ -54,7 +59,7 @@ const ComponentCell = ({ component, isSelected, onClick }) => { {inner} -- 2.39.5