aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/coffee/component-viewer/source.coffee10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/source.coffee b/server/sonar-web/src/main/coffee/component-viewer/source.coffee
index c4a9b5c9619..f0c17c7a127 100644
--- a/server/sonar-web/src/main/coffee/component-viewer/source.coffee
+++ b/server/sonar-web/src/main/coffee/component-viewer/source.coffee
@@ -155,11 +155,13 @@ define [
highlightLine: (e) ->
- @$(".#{HIGHLIGHTED_ROW_CLASS}").removeClass HIGHLIGHTED_ROW_CLASS
row = $(e.currentTarget).closest('.row')
- row.addClass HIGHLIGHTED_ROW_CLASS
- @highlightedLine = row.data 'line-number'
- @showLineActionsPopup(e) if @options.main.state.get 'canCreateManualIssue'
+ highlighted = row.is ".#{HIGHLIGHTED_ROW_CLASS}"
+ @$(".#{HIGHLIGHTED_ROW_CLASS}").removeClass HIGHLIGHTED_ROW_CLASS
+ unless highlighted
+ row.addClass HIGHLIGHTED_ROW_CLASS
+ @highlightedLine = row.data 'line-number'
+ @showLineActionsPopup(e)
highlightCurrentLine: ->