Merge pull request #3038 from mempool/mononaut/reset-block-scroll

Fix firefox blockchain scroll reset bug
This commit is contained in:
softsimon 2023-02-13 16:35:09 +07:00 committed by GitHub
commit 0148a5f489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -298,6 +298,10 @@ export class StartComponent implements OnInit, OnDestroy {
} }
ngOnDestroy() { ngOnDestroy() {
if (this.blockchainContainer?.nativeElement) {
// clean up scroll position to prevent caching wrong scroll in Firefox
this.blockchainContainer.nativeElement.scrollLeft = 0;
}
this.timeLtrSubscription.unsubscribe(); this.timeLtrSubscription.unsubscribe();
this.chainTipSubscription.unsubscribe(); this.chainTipSubscription.unsubscribe();
this.markBlockSubscription.unsubscribe(); this.markBlockSubscription.unsubscribe();