diff options
Diffstat (limited to 'src/components/timeline')
| -rw-r--r-- | src/components/timeline/timeline.js | 6 | ||||
| -rw-r--r-- | src/components/timeline/timeline.scss | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 8ec5d1e5..9056319b 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -64,7 +64,7 @@ const Timeline = { if (this.blockingClicks) rootClasses = rootClasses.concat(['-blocked', '_misclick-prevention']) return { root: rootClasses, - header: ['timeline-heading'].concat(!this.embedded ? ['panel-heading'] : []), + header: ['timeline-heading'].concat(!this.embedded ? ['panel-heading', '-sticky'] : []), body: ['timeline-body'].concat(!this.embedded ? ['panel-body'] : []), footer: ['timeline-footer'].concat(!this.embedded ? ['panel-footer'] : []) } @@ -89,7 +89,7 @@ const Timeline = { const credentials = store.state.users.currentUser.credentials const showImmediately = this.timeline.visibleStatuses.length === 0 - window.addEventListener('scroll', this.handleScroll) + document.getElementById('content').addEventListener('scroll', this.handleScroll) if (store.state.api.fetchers[this.timelineName]) { return false } @@ -111,7 +111,7 @@ const Timeline = { setTimeout(this.determineVisibleStatuses, 250) }, unmounted () { - window.removeEventListener('scroll', this.handleScroll) + document.getElementById('content').removeEventListener('scroll', this.handleScroll) window.removeEventListener('keydown', this.handleShortKey) if (typeof document.hidden !== 'undefined') document.removeEventListener('visibilitychange', this.handleVisibilityChange, false) this.$store.commit('setLoading', { timeline: this.timelineName, value: false }) diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index 2c5a67e2..c10375d4 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -13,7 +13,6 @@ max-width: 100%; flex-wrap: nowrap; align-items: center; - position: relative; .loadmore-button { flex-shrink: 0; |
