Fix clicking bookmark column header not scrolling to top in single-column
This commit is contained in:
parent
b76cef6212
commit
22af8f7563
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue