Commit d840fab923f09abb1534faa4b63e912b0856fca9
1 parent
ad4f98b3
Exists in
master
and in
29 other branches
Fixes focus on first input when post a comment
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
public/javascripts/comment_form.js
... | ... | @@ -3,7 +3,7 @@ jQuery('.display-comment-form').click(function(){ |
3 | 3 | var $button = jQuery(this); |
4 | 4 | toggleBox($button.parents('.post_comment_box')); |
5 | 5 | jQuery($button).hide(); |
6 | - $button.closest('.page-comment-form').find('input').first().focus(); | |
6 | + $button.closest('.page-comment-form').find('input[type="text"]:visible,textarea').first().focus(); | |
7 | 7 | return false; |
8 | 8 | }); |
9 | 9 | ... | ... |