diff --git a/web_src/js/index.js b/web_src/js/index.js
index 63a5134bbd..2203ab7243 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -1135,6 +1135,7 @@ async function initRepository() {
     $repoComparePull.find('button.show-form').on('click', function (e) {
       e.preventDefault();
       $repoComparePull.find('.pullrequest-form').show();
+      autoSimpleMDE.codemirror.refresh();
       $(this).parent().hide();
     });
   }