From d840fab923f09abb1534faa4b63e912b0856fca9 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 24 Oct 2014 15:30:06 -0300 Subject: [PATCH] Fixes focus on first input when post a comment --- public/javascripts/comment_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/comment_form.js b/public/javascripts/comment_form.js index 10466ab..9f96ff8 100644 --- a/public/javascripts/comment_form.js +++ b/public/javascripts/comment_form.js @@ -3,7 +3,7 @@ jQuery('.display-comment-form').click(function(){ var $button = jQuery(this); toggleBox($button.parents('.post_comment_box')); jQuery($button).hide(); - $button.closest('.page-comment-form').find('input').first().focus(); + $button.closest('.page-comment-form').find('input[type="text"]:visible,textarea').first().focus(); return false; }); -- libgit2 0.21.2