diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-02-01 19:19:40 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2021-02-01 19:19:50 +0100 |
commit | fb7b009d6368acacade236b74406709851a0eaa5 (patch) | |
tree | ba181c2ffe808d992f32a7b6f9975fc790e817b4 | |
parent | c9b369096d1c461045c1d81390aa1883542e44df (diff) | |
download | PeerTube-fb7b009d6368acacade236b74406709851a0eaa5.tar.gz PeerTube-fb7b009d6368acacade236b74406709851a0eaa5.tar.zst PeerTube-fb7b009d6368acacade236b74406709851a0eaa5.zip |
fix trending page scroll
fixes #3665
-rw-r--r-- | client/src/app/shared/shared-video-miniature/abstract-video-list.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts index 3e84589cd..14a29d05f 100644 --- a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts +++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts | |||
@@ -363,7 +363,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, AfterConte | |||
363 | categoryOneOf: this.categoryOneOf | 363 | categoryOneOf: this.categoryOneOf |
364 | } | 364 | } |
365 | 365 | ||
366 | let path = this.router.url | 366 | let path = this.getUrlWithoutParams() |
367 | if (!path || path === '/') path = this.serverConfig.instance.defaultClientRoute | 367 | if (!path || path === '/') path = this.serverConfig.instance.defaultClientRoute |
368 | 368 | ||
369 | this.router.navigate([ path ], { queryParams, replaceUrl: true, queryParamsHandling: 'merge' }) | 369 | this.router.navigate([ path ], { queryParams, replaceUrl: true, queryParamsHandling: 'merge' }) |
@@ -380,4 +380,10 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, AfterConte | |||
380 | this.nsfwPolicy = user.nsfwPolicy | 380 | this.nsfwPolicy = user.nsfwPolicy |
381 | })) | 381 | })) |
382 | } | 382 | } |
383 | |||
384 | private getUrlWithoutParams () { | ||
385 | let urlTree = this.router.parseUrl(this.router.url) | ||
386 | urlTree.queryParams = {} | ||
387 | return urlTree.toString() | ||
388 | } | ||
383 | } | 389 | } |