This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 828
Fix scroll-jumps when jumping to a permalink #9340
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c9198f6
Fix scroll-jumps when jumping to a permalink
ara4n 1335e28
Merge branch 'develop' into matthew/fix-scroll-jumps-on-permalink
MadLittleMods 39c0112
Merge branch 'develop' into matthew/fix-scroll-jumps-on-permalink
Johennes d96a42d
Merge branch 'develop' into matthew/fix-scroll-jumps-on-permalink
t3chguy 04a8d46
Merge branch 'develop' into matthew/fix-scroll-jumps-on-permalink
dbkr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,7 +226,15 @@ export default class ScrollPanel extends React.Component<IProps> { | |
|
||
private onScroll = ev => { | ||
// 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; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@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", this.getScrollNode().scrollTop); | ||
this.scrollTimeout.restart(); | ||
this.saveScrollState(); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ship this 🙇
Merged
develop
so we can ensure it's still good to go test wise even though there are no scroll tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript strict CI job is failing but it's complaining about an adjacent unrelated line of code and that job is not required to pass ✅
Cypress flake that passed after the second run ✅
Everything looks okay to merge ⏩