]> source.dussan.org Git - gitea.git/commitdiff
Don't auto-init SimpleMDE for review textarea (#9574)
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>
Thu, 2 Jan 2020 03:02:11 +0000 (21:02 -0600)
committerAntoine GIRARD <sapk@users.noreply.github.com>
Thu, 2 Jan 2020 03:02:11 +0000 (04:02 +0100)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
templates/repo/diff/box.tmpl
web_src/js/index.js

index 9f3b271e24b5c6f234f9620817604b35e7982abe..9b0738b1b78358f035aeb73e5234739c3dfcb7aa 100644 (file)
                                                                                        <a class="preview item" data-url="{{$.Repository.APIURL}}/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a>
                                                                        </div>
                                                                        <div class="ui bottom attached active write tab segment">
-                                                                                       <textarea tabindex="1" name="content"></textarea>
+                                                                                       <textarea class="review-textarea" tabindex="1" name="content"></textarea>
                                                                        </div>
                                                                        <div class="ui bottom attached tab preview segment markdown">
                                                                        {{$.i18n.Tr "loading"}}
index f4f08b828c8c47b789643188ab261878563222fc..3751c6d9e46f21f020d89a56f1495a66890b1b9b 100644 (file)
@@ -325,7 +325,7 @@ function initCommentForm() {
     return;
   }
 
-  setCommentSimpleMDE($('.comment.form textarea'));
+  setCommentSimpleMDE($('.comment.form textarea:not(.review-textarea)'));
   initBranchSelector();
   initCommentPreviewTab($('.comment.form'));
   initImagePaste($('.comment.form textarea'));