Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-05-17 22:58:47 +0300
committerEric Eastwood <contact@ericeastwood.com>2017-05-18 07:30:13 +0300
commit027ad1381e509236b789c58ee7b3d057dd5517b5 (patch)
tree8f5e75ae051fc1ff7f7eeba3802f0fe4d6dc6d9d /app/assets/javascripts/merge_request_tabs.js
parent319cab4115380d3bff1e6543b759e785aa36a666 (diff)
Fix linking to unresolved/expanded diff note
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/32424 Bug introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11327
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js
index 37822dac064..22032d0f914 100644
--- a/app/assets/javascripts/merge_request_tabs.js
+++ b/app/assets/javascripts/merge_request_tabs.js
@@ -288,7 +288,11 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
if (anchor) {
const notesContent = anchor.closest('.notes_content');
const lineType = notesContent.hasClass('new') ? 'new' : 'old';
- notes.addDiffNote(anchor, lineType, false);
+ notes.toggleDiffNote({
+ target: anchor,
+ lineType,
+ forceShow: true,
+ });
anchor[0].scrollIntoView();
// We have multiple elements on the page with `#note_xxx`
// (discussion and diff tabs) and `:target` only applies to the first