diff options
Diffstat (limited to 'web/scripts3.js')
-rw-r--r-- | web/scripts3.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/web/scripts3.js b/web/scripts3.js index ec86d39e..12e0aeee 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -39,10 +39,21 @@ function showCommentForm(mid,rid) { var c=$('#replies #'+rid+' .msg-comment'); c.wrap('<form action="/post" method="POST" enctype="multipart/form-data"/>'); c.before('<input type="hidden" name="mid" value="'+mid+'"/><input type="hidden" name="rid" value="'+rid+'"/>'); - c.append('<textarea name="body" rows="1" placeholder="Add a comment..." onkeypress="postformListener(this.form,event)"></textarea>'); + c.append('<textarea name="body" rows="1" class="reply" placeholder="Add a comment..." onkeypress="postformListener(this.form,event)"></textarea>'); } $('#replies #'+rid+' .msg-links').hide(); $('#replies #'+rid+' .msg-comment').show(); $('#replies #'+rid+' textarea')[0].focus(); + $('#replies #'+rid+' textarea').autoResize({ + extraSpace: 0, + minHeight: 1 + }); return false; } + +$(document).ready(function() { + $('textarea.reply').autoResize({ + extraSpace: 0, + minHeight: 1 + }); +}); |