Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/components/structures/ScrollPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,15 @@ export default class ScrollPanel extends React.Component<IProps> {

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;
}
Copy link
Contributor

@MadLittleMods MadLittleMods Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're not sure if this actually fixes an issue at the moment, and needs a regression test to do so.

@ara4n thinks the problem might still be reproducible even with this fix but do these changes at least make sense? There could be many points that could cause the problem and this plugs a few of the holes.

In that case, we should merge anyway

debuglog("onScroll called past resize gate; scroll node top:", this.getScrollNode().scrollTop);
this.scrollTimeout?.restart();
this.saveScrollState();
Expand Down