mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-26 16:03:02 +00:00
Fix bug
This commit is contained in:
parent
cfad9ce6f2
commit
4458350ee5
1 changed files with 10 additions and 6 deletions
|
@ -241,11 +241,13 @@
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.opts.customize) {
|
||||||
this.containerTop = this.refs.main.getBoundingClientRect().top;
|
this.containerTop = this.refs.main.getBoundingClientRect().top;
|
||||||
this.headerHight = this.root.getBoundingClientRect().top;
|
this.headerHight = this.root.getBoundingClientRect().top;
|
||||||
|
|
||||||
window.addEventListener('scroll', this.followWidgets);
|
window.addEventListener('scroll', this.followWidgets);
|
||||||
window.addEventListener('resize', this.followWidgets);
|
window.addEventListener('resize', this.followWidgets);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on('unmount', () => {
|
this.on('unmount', () => {
|
||||||
|
@ -253,8 +255,10 @@
|
||||||
widget.unmount();
|
widget.unmount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!this.opts.customize) {
|
||||||
window.removeEventListener('scroll', this.followWidgets);
|
window.removeEventListener('scroll', this.followWidgets);
|
||||||
window.removeEventListener('resize', this.followWidgets);
|
window.removeEventListener('resize', this.followWidgets);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.followWidgets = () => {
|
this.followWidgets = () => {
|
||||||
|
|
Loading…
Reference in a new issue