+
diff --git a/lib/shared/components/StickySidebar/sticky-sidebar.ts b/lib/shared/components/StickySidebar/sticky-sidebar.ts
index 82988f4c..9482697e 100644
--- a/lib/shared/components/StickySidebar/sticky-sidebar.ts
+++ b/lib/shared/components/StickySidebar/sticky-sidebar.ts
@@ -25,7 +25,6 @@ export class StickySidebar implements OnInit, OnDestroy {
bind() {
this.cancelScrollBinding = DOM.onAndCancel(this.scrollParent, 'scroll', () => { this.updatePosition(); });
- this.updatePosition();
}
unbind() {
@@ -56,8 +55,9 @@ export class StickySidebar implements OnInit, OnDestroy {
ngOnInit() {
// FIXME use more reliable code
- this.$redocEl = this.$element.offsetParent || DOM.defaultDoc().body;
+ this.$redocEl = this.$element.offsetParent.parentNode || DOM.defaultDoc().body;
this.bind();
+ this.updatePosition();
}
ngOnDestroy() {