diff --git a/src/components/structures/ScrollPanel.tsx b/src/components/structures/ScrollPanel.tsx index 6d7672629fb..f306793f2c1 100644 --- a/src/components/structures/ScrollPanel.tsx +++ b/src/components/structures/ScrollPanel.tsx @@ -232,7 +232,15 @@ export default class ScrollPanel extends React.Component { private onScroll = (ev: Event): void => { // skip scroll events caused by resizing - if (this.props.resizeNotifier && this.props.resizeNotifier.isResizing) return; + if (this.props.resizeNotifier && this.props.resizeNotifier.isResizing) { + debuglog("skipping onScroll due to isResizing", this.getScrollNode().scrollTop); + return; + } + // skip scroll events which are triggered by backfilling (i.e. while loading permalinks) + if (this.isFilling) { + debuglog("skipping onScroll due to isFilling", this.getScrollNode().scrollTop); + return; + } debuglog("onScroll called past resize gate; scroll node top:", this.getScrollNode().scrollTop); this.scrollTimeout?.restart(); this.saveScrollState();