]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1472757 - Comment field empty after clicking "go back page"
authorKohei Yoshino <kohei.yoshino@gmail.com>
Tue, 25 Feb 2020 17:26:44 +0000 (12:26 -0500)
committerGitHub <noreply@github.com>
Tue, 25 Feb 2020 17:26:44 +0000 (12:26 -0500)
extensions/BugModal/web/bug_modal.js
template/en/default/bug/process/results.html.tmpl

index c2136d5ff33f36c88e8b9750d29ab1bbb59a532d..d34760cd974a8da535bbd1e3b110a82f0a9df4f5 100644 (file)
@@ -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);
 
index f43a5e5b64cca36e6aa63131fc7f73bc5c4f472e..759605f6b408288893634ee60fadda5b56f0d15f 100644 (file)
@@ -49,7 +49,7 @@
 
 [% Hook.process('title') %]
 
-<dl class="change-summary bug">
+<dl class="change-summary bug" data-type="[% type FILTER html %]">
   <dt>[% title.$type %]</dt>
   <dd>
     [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = id %]