aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-08 15:16:54 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-01-09 11:15:15 +0100
commit43483d12963ed7a82adee2e35a7bcb7e55e54b3e (patch)
treeec153a900f6d3c4de775ce76340a4c37f070fe4c /client/src/app/videos/+video-watch/comment
parent07a982363fcc6f838dd3f5c2039a2affaea3b0b2 (diff)
downloadPeerTube-43483d12963ed7a82adee2e35a7bcb7e55e54b3e.tar.gz
PeerTube-43483d12963ed7a82adee2e35a7bcb7e55e54b3e.tar.zst
PeerTube-43483d12963ed7a82adee2e35a7bcb7e55e54b3e.zip
Correctly scroll to video comment
Diffstat (limited to 'client/src/app/videos/+video-watch/comment')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts
index dc62fe5ae..2616820d2 100644
--- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts
@@ -83,11 +83,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
83 this.highlightedThread = new VideoComment(res.comment) 83 this.highlightedThread = new VideoComment(res.comment)
84 84
85 // Scroll to the highlighted thread 85 // Scroll to the highlighted thread
86 setTimeout(() => { 86 setTimeout(() => this.commentHighlightBlock.nativeElement.scrollIntoView(), 0)
87 // -60 because of the fixed header
88 const scrollY = this.commentHighlightBlock.nativeElement.offsetTop - 60
89 window.scroll(0, scrollY)
90 }, 500)
91 } 87 }
92 }, 88 },
93 89