#4342 templates/pull_request: use different id for inline comment to avoid messing with the main comment box
Merged 5 years ago by pingou. Opened 5 years ago by jlanda.
jlanda/pagure fix-inline-comment  into  master

@@ -16,7 +16,7 @@ 

          id="comment_block">

  

        <div id="edit">

-         <textarea class="form-control" id="comment" name="comment"

+         <textarea class="form-control" id="inline-comment" name="comment"

              title="comment" style="width:100%;">

            {{- form.comment.data if form.comment.data else '' -}}

          </textarea>

@@ -1172,7 +1172,7 @@ 

  

    /* Keep some variable in memory before sending them in case the SSE is down */

    var _update = false;

-   var _comment = $(form).find('#comment').val();

+   var _comment = inline ? $(form).find('#inline-comment').val() : $(form).find('#comment').val();

    var _comment_id = null;

    if (!_comment && form.update_comment) {

      _update = true;