summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notes.js3
-rw-r--r--app/controllers/concerns/notes_actions.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 9c008da1a5d..cf247a4c170 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -414,7 +414,8 @@ export default class Notes {
}
this.note_ids.push(noteEntity.id);
form = $form || $(`.js-discussion-note-form[data-discussion-id="${noteEntity.discussion_id}"]`);
- row = form.closest('tr');
+
+ row = form.length ? form.closest('tr') : $(`#${noteEntity.discussion_line_code}`);
if (noteEntity.on_image) {
row = form;
diff --git a/app/controllers/concerns/notes_actions.rb b/app/controllers/concerns/notes_actions.rb
index 1126f706393..688bf16cfea 100644
--- a/app/controllers/concerns/notes_actions.rb
+++ b/app/controllers/concerns/notes_actions.rb
@@ -106,7 +106,8 @@ module NotesActions
discussion_resolvable: discussion.resolvable?,
diff_discussion_html: diff_discussion_html(discussion),
- discussion_html: discussion_html(discussion)
+ discussion_html: discussion_html(discussion),
+ discussion_line_code: discussion.line_code,
)
end
end