diff options
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/column.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/column.js b/app/javascript/flavours/glitch/features/ui/components/column.js index ab78414e0..916396931 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column.js +++ b/app/javascript/flavours/glitch/features/ui/components/column.js @@ -14,10 +14,11 @@ export default class Column extends React.PureComponent { active: PropTypes.bool, hideHeadingOnMobile: PropTypes.bool, name: PropTypes.string, + bindToDocument: PropTypes.bool, }; handleHeaderClick = () => { - const scrollable = this.node.querySelector('.scrollable'); + const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable'); if (!scrollable) { return; @@ -27,7 +28,7 @@ export default class Column extends React.PureComponent { } scrollTop () { - const scrollable = this.node.querySelector('.scrollable'); + const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable'); if (!scrollable) { return; |