From cdb28f956e5cab941cf66e94238ca7e5be23c1a0 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 31 Aug 2017 16:29:31 +0100 Subject: [PATCH] Add comment for StickyContainer extension --- src/components/structures/ScrollPanel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index cbd2954918..abb9ddff49 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -117,7 +117,11 @@ export default class ScrollPanel extends StickyContainer { debuglog("Scroll event: offset now:", sn.scrollTop, "_lastSetScroll:", this._lastSetScroll); + // Set the node and notify subscribers of the StickContainer + // By extending StickyContainer, we can set the scroll node to be that of the + // ScrolPanel to allow any `` children to be sticky, namely DateSeparators. this.node = sn; + // Update subscribers - arbitrarily nested `` children this.notifySubscribers(ev); // Sometimes we see attempts to write to scrollTop essentially being