From: Stas Vilchik Date: Thu, 24 Mar 2016 12:59:23 +0000 (+0100) Subject: SONAR-7402 provide link to file X-Git-Tag: 5.5-M11~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=891f9fe52635c0d9714d60fb99308c201bfa4108;p=sonarqube.git SONAR-7402 provide link to file --- 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}