Skip to content

Commit

Permalink
DON-1092 – Explain blurredSinceLastMajorScroll resets
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelLH committed Nov 27, 2024
1 parent 7ec20f2 commit 848618c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/explore/explore.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export class ExploreComponent implements OnDestroy, OnInit {
onScroll() {
const scrollPositionY = this.scroller.getScrollPosition()[1];
if (scrollPositionY < this.smallestSignificantScrollPx) {
// If we're now near the top, reset any previous input blurring as it might be helpful to blur again.
this.blurredSinceLastMajorScroll = false;
return;
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/meta-campaign/meta-campaign.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ export class MetaCampaignComponent implements AfterViewChecked, OnDestroy, OnIni
onScroll() {
const scrollPositionY = this.scroller.getScrollPosition()[1];
if (scrollPositionY < this.smallestSignificantScrollPx) {
// If we're now near the top, reset any previous input blurring as it might be helpful to blur again.
this.blurredSinceLastMajorScroll = false;

// On return with internal app nav, automatic position seems to be [0,59]
// or so as of Nov '22. So we want only larger scrolls to be picked up as
// donor intervention and to turn off auto-scroll + trigger loading of
Expand Down

0 comments on commit 848618c

Please sign in to comment.