From 4fd19473b214ea78fa67ca4ff001599cbdd3c0fb Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 21 Mar 2026 03:23:59 +0000 Subject: [PATCH] Scroll to notes section instead of top of edit form when quoting issue content (#43085). Patch by kyohei yamada (user:kyamada23). git-svn-id: https://svn.redmine.org/redmine/trunk@24521 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/journals/new.js.erb | 3 ++- test/functional/journals_controller_test.rb | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/journals/new.js.erb b/app/views/journals/new.js.erb index 0f832f37f..be3d2b3d8 100644 --- a/app/views/journals/new.js.erb +++ b/app/views/journals/new.js.erb @@ -1,4 +1,5 @@ -showAndScrollTo("update"); +$('#update').show(); +showAndScrollTo("add_notes"); var notes = $('#issue_notes').val(); if (notes > "") { notes = notes + "\n\n"} diff --git a/test/functional/journals_controller_test.rb b/test/functional/journals_controller_test.rb index f6549910a..271336aaa 100644 --- a/test/functional/journals_controller_test.rb +++ b/test/functional/journals_controller_test.rb @@ -167,6 +167,7 @@ class JournalsControllerTest < Redmine::ControllerTest assert_response :success assert_equal 'text/javascript', response.media_type + assert_include 'showAndScrollTo("add_notes");', response.body assert_include '> This is an issue', response.body end @@ -189,6 +190,7 @@ class JournalsControllerTest < Redmine::ControllerTest ) assert_response :success assert_equal 'text/javascript', response.media_type + assert_include 'showAndScrollTo("add_notes");', response.body assert_include 'Redmine Admin wrote in #note-1:', response.body assert_include '> A comment with a private version', response.body end