mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Timeline issues on sites with large headers
This commit is contained in:
@@ -18,15 +18,13 @@ export default MountWidget.extend(Docking, {
|
||||
dockBottom: this.dockBottom };
|
||||
},
|
||||
|
||||
@observes('topic.highest_post_number')
|
||||
@observes('topic.highest_post_number', 'loading')
|
||||
newPostAdded() {
|
||||
this.queueRerender(() => this.queueDockCheck());
|
||||
},
|
||||
|
||||
dockCheck(info) {
|
||||
if (this.get('loading')) { return; }
|
||||
|
||||
const topicTop = $('.container.posts').offset().top;
|
||||
const topicTop = $('.container.posts').offset().top - $('#main').offset().top;
|
||||
const topicBottom = $('#topic-bottom').offset().top;
|
||||
const $timeline = this.$('.timeline-container');
|
||||
const timelineHeight = $timeline.height() || 400;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const helper = {
|
||||
offset: () => window.pageYOffset || $('html').scrollTop()
|
||||
offset: () => (window.pageYOffset || $('html').scrollTop()) - $('#main').offset().top
|
||||
};
|
||||
|
||||
export default Ember.Mixin.create({
|
||||
|
||||
Reference in New Issue
Block a user