diff --git a/app/assets/javascripts/mobile/mobile_comments.js b/app/assets/javascripts/mobile/mobile_comments.js
index 3e6300b5f..189b43f4b 100644
--- a/app/assets/javascripts/mobile/mobile_comments.js
+++ b/app/assets/javascripts/mobile/mobile_comments.js
@@ -146,9 +146,11 @@
},
addNewComments: function(bottomBar, data) {
- var commentsContainer = bottomBar.find(".comment_container").first();
- var comments = commentsContainer.find(".comments").first();
- comments.append(data);
+ if ($(".comment_container", bottomBar).length === 0) {
+ $(".show_comments", bottomBar).after($("
", {"class": "comment_container"}));
+ $(".comment_container", bottomBar).append($("", {"class": "comments"}));
+ }
+ $(".comment_container .comments", bottomBar).append(data);
},
// Fix for no comments
diff --git a/features/mobile/reactions.feature b/features/mobile/reactions.feature
index 20e09f0dd..7b2e625b3 100644
--- a/features/mobile/reactions.feature
+++ b/features/mobile/reactions.feature
@@ -28,7 +28,7 @@ Feature: reactions mobile post
And I fill in the following:
| text | is that a poodle? |
And I press "Comment"
- Then I should see "is that a poodle?"
+ Then I should see "is that a poodle?" within ".comment_container"
When I go to the stream page
And I should see "1 reaction" within ".show_comments"
And I click on selector "a.show_comments"