aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
authorKimsible <1877318+kimsible@users.noreply.github.com>2020-11-17 14:04:44 +0100
committerGitHub <noreply@github.com>2020-11-17 14:04:44 +0100
commitf3081d6401b63da41b03376f9f952bf1cca8303d (patch)
tree90ec91babde1544ca0a3423b031c9e10dfcac596 /client/src/app/app.component.ts
parent901c36d5f44e02436da5f5c2899666329ff2eb5b (diff)
downloadPeerTube-f3081d6401b63da41b03376f9f952bf1cca8303d.tar.gz
PeerTube-f3081d6401b63da41b03376f9f952bf1cca8303d.tar.zst
PeerTube-f3081d6401b63da41b03376f9f952bf1cca8303d.zip
small refactor + clipboard copy on anchor click in instance page (#3318)
* Refacto scrollTo top and anchors * Add on click clipboard copy and notifier to anchors about/instance page * Fix margin top anchor middle title about page * Use viewportscroller for scrolltoanchor * Add to Link copied notification on instance page Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r--client/src/app/app.component.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index edec3216e..da51040ad 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -121,7 +121,7 @@ export class AppComponent implements OnInit, AfterViewInit {
121 // scrollToAnchor first to preserve anchor position when using history navigation 121 // scrollToAnchor first to preserve anchor position when using history navigation
122 if (e.anchor) { 122 if (e.anchor) {
123 setTimeout(() => { 123 setTimeout(() => {
124 document.getElementById(e.anchor).scrollIntoView({ behavior: 'smooth', inline: 'nearest' }) 124 this.viewportScroller.scrollToAnchor(e.anchor)
125 }) 125 })
126 126
127 return 127 return