From ee6cd3e4c40a94b302bae14f5ef514ff9f922254 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 3 Jun 2016 16:54:54 -0400 Subject: [PATCH] FIX: On mobile the highlight was being cut off --- app/assets/javascripts/discourse/views/topic.js.es6 | 2 +- app/assets/javascripts/discourse/widgets/post.js.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/views/topic.js.es6 b/app/assets/javascripts/discourse/views/topic.js.es6 index 67ac67af069..e756becce7f 100644 --- a/app/assets/javascripts/discourse/views/topic.js.es6 +++ b/app/assets/javascripts/discourse/views/topic.js.es6 @@ -137,7 +137,7 @@ const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolli }); function highlight(postNumber) { - const $contents = $('#post_' + postNumber +' .topic-body'), + const $contents = $(`#post_${postNumber} .topic-body`), origColor = $contents.data('orig-color') || $contents.css('backgroundColor'); $contents.data("orig-color", origColor) diff --git a/app/assets/javascripts/discourse/widgets/post.js.es6 b/app/assets/javascripts/discourse/widgets/post.js.es6 index 2ffd5fb237d..506e9dab7b7 100644 --- a/app/assets/javascripts/discourse/widgets/post.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post.js.es6 @@ -296,7 +296,7 @@ createWidget('post-contents', { }); createWidget('post-body', { - tagName: 'div.topic-body', + tagName: 'div.topic-body.clearfix', html(attrs) { const postContents = this.attach('post-contents', attrs);