diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-09-17 00:01:42 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-09-17 00:01:42 +0000 |
commit | d38499b3a785ea9d15cb3f108764d20016ea8ea7 (patch) | |
tree | f8528bcb88351018b953c32404d3729c06a1a738 | |
parent | 35bed03c99c12488f88fa49602a5e77ad08bcfa4 (diff) | |
parent | 2eb2cbe6ae4aa8c66966f47f84551c76d114af75 (diff) | |
download | gitlab-ce-d38499b3a785ea9d15cb3f108764d20016ea8ea7.tar.gz |
Merge branch 'diff-line-highlighting-fix' into 'master'
Fix line diff side-by-side line highlighting
## What does this MR do?
Fixes line highlighting in diff side-by-side view from working correctly.
The JS was looking for a class, but the class doesn't exist & instead it was a data attribute.
## Screenshots (if relevant)

See merge request !6316
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index dcba4a8d275..18bbfa7a459 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -232,10 +232,10 @@ $('.hll').removeClass('hll'); locationHash = window.location.hash; if (locationHash !== '') { - hashClassString = "." + (locationHash.replace('#', '')); + dataLineString = '[data-line-code="' + locationHash.replace('#', '') + '"]'; $diffLine = $(locationHash + ":not(.match)", $('#diffs')); if (!$diffLine.is('tr')) { - $diffLine = $('#diffs').find("td" + locationHash + ", td" + hashClassString); + $diffLine = $('#diffs').find("td" + locationHash + ", td" + dataLineString); } else { $diffLine = $diffLine.find('td'); } |