Project

General

Profile

Actions

Defect #39932

closed

Incorrect position of "Edited" mark in issue notes with h4 headings

Added by Yasu Saku 12 months ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

"Edited tag" position is incorrect after issue note update, but it is correct after the page is reloaded.

Steps to reproduce:

  1. Edit the existing note using the Edit Note button in the issue history.
  2. Update note containing H4 tags.

My Environment:

  Redmine version                5.1.1.stable
  Ruby version                   3.2.2-p53 (2023-03-30) [x86_64-linux]
  Rails version                  6.1.7.6

Proposal:

To resolve this issue, I believe it might be sufficient to make corrections to the following sections.

diff --git a/app/views/journals/update.js.erb b/app/views/journals/update.js.erb
index 87320c5d4a..0b9f99a31a 100644
--- a/app/views/journals/update.js.erb
+++ b/app/views/journals/update.js.erb
@@ -7,7 +7,7 @@
   $("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
   $("#journal-<%= @journal.id %>-notes").show();
   $("#journal-<%= @journal.id %>-form").remove();
-  var journal_header = $("#change-<%= @journal.id %> h4");
+  var journal_header = $("#change-<%= @journal.id %>>div.note>h4.note-header");
   var journal_updated_info = journal_header.find("span.update-info");
   if (journal_updated_info.length > 0) {
     journal_updated_info.replaceWith('<%= escape_javascript(render_journal_update_info(@journal)) %>');

source:/tags/5.1.1/app/views/journals/update.js.erb#L10


Files

journal_edit.png (133 KB) journal_edit.png Yasu Saku, 2023-12-24 10:39
Actions

Also available in: Atom PDF