1
0
Fork 0
mirror of https://github.com/Findus23/HNReader.git synced 2024-09-19 15:23:44 +02:00

scroll up on new comment page

This commit is contained in:
Lukas Winkler 2021-05-01 22:49:21 +02:00
parent 5afa71fa86
commit a062d75f35
Signed by: lukas
GPG key ID: 54DE4D798D244853
3 changed files with 8 additions and 3 deletions

View file

@ -18,7 +18,7 @@ html, body {
background: white;
}
#sidebar .stories, #mainpane .comments, #mainpane .reader {
#sidebar .stories, #mainpane #comments, #mainpane .reader {
overflow-y: auto;
height: calc(100% - #{$topNavBarHeight});
}

View file

@ -99,7 +99,7 @@ pre {
}
}
.comments {
#comments {
background: $backgroundColorLighter;
.kids .kids {

View file

@ -1,5 +1,5 @@
<template>
<div class="comments">
<div id="comments">
<Header :item="story"></Header>
<comment v-if="!story.url" :item="story" :original-author="story.by" :text-post="true"></comment>
<div v-if="loading">LOADING</div>
@ -40,6 +40,11 @@ export default defineComponent({
})
.then(data => (this.story = data))
.then(a => {
const el = document.getElementById("comments");
if (el) {
console.log(el)
el.scrollTop = 0
}
this.loading = false;
document.title = this.story.title
})