diff --git a/app/soapbox/components/status_list.js b/app/soapbox/components/status_list.js index f96ec779f..c843a4b64 100644 --- a/app/soapbox/components/status_list.js +++ b/app/soapbox/components/status_list.js @@ -82,7 +82,6 @@ export default class StatusList extends ImmutablePureComponent { } handleDequeueTimeline = () => { - window.scrollTo({ top: 0, behavior: 'smooth' }); const { onDequeueTimeline, timelineId } = this.props; if (!onDequeueTimeline || !timelineId) return; onDequeueTimeline(timelineId); diff --git a/app/soapbox/components/timeline_queue_button_header.js b/app/soapbox/components/timeline_queue_button_header.js index bb02b0193..25a219336 100644 --- a/app/soapbox/components/timeline_queue_button_header.js +++ b/app/soapbox/components/timeline_queue_button_header.js @@ -55,8 +55,13 @@ class TimelineQueueButtonHeader extends React.PureComponent { } }, 150, { trailing: true }); + handleClick = e => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + this.props.onClick(e); + } + render() { - const { count, message, onClick, intl } = this.props; + const { count, message, intl } = this.props; const { scrolled } = this.state; const visible = count > 0 && scrolled; @@ -67,7 +72,7 @@ class TimelineQueueButtonHeader extends React.PureComponent { return (
- + {(count > 0) && (