From 0de0d8855c625189d0f2028e1a1e5736e8fbdcea Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Tue, 20 Aug 2013 00:47:45 +0200 Subject: [PATCH] fix weird bug with comment_box focus --- .../app/views/single-post-viewer/single_post_actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js b/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js index d59e52809..7e066389c 100644 --- a/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js +++ b/app/assets/javascripts/app/views/single-post-viewer/single_post_actions.js @@ -14,8 +14,8 @@ app.views.SinglePostActions = app.views.Feedback.extend({ }, focusComment: function() { - $('.comment_box').focus(); - $('html,body').animate({scrollTop: $('.comment_box').offset().top - ($('.comment_box').height() + 20)}); + $('.comment_stream .comment_box').focus(); + $('html,body').animate({scrollTop: $('.comment_stream .comment_box').offset().top - ($('.comment_stream .comment_box').height() + 20)}); return false; }