From: Kohei Yoshino Date: Tue, 25 Feb 2020 17:26:44 +0000 (-0500) Subject: Bug 1472757 - Comment field empty after clicking "go back page" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a01c1196fcb2b1234b16e1931cddac58e91ac1df;p=thirdparty%2Fbugzilla.git Bug 1472757 - Comment field empty after clicking "go back page" --- diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index c2136d5ff..d34760cd9 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -119,6 +119,11 @@ $(function() { localStorage.removeItem(key); } + // Clear saved comment once the bug is successfully updated + if (document.querySelector('.change-summary[data-type="bug"]')) { + clearSavedBugComment(); + } + function restoreSavedBugComment() { expireSavedComments(); let key = `bug-modal-saved-comment-${BUGZILLA.bug_id}`; @@ -701,8 +706,6 @@ $(function() { .toArray() .join(' ') ); - - clearSavedBugComment(); }) .attr('disabled', false); diff --git a/template/en/default/bug/process/results.html.tmpl b/template/en/default/bug/process/results.html.tmpl index f43a5e5b6..759605f6b 100644 --- a/template/en/default/bug/process/results.html.tmpl +++ b/template/en/default/bug/process/results.html.tmpl @@ -49,7 +49,7 @@ [% Hook.process('title') %] -
+
[% title.$type %]
[% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = id %]