Skip to content
Snippets Groups Projects
Commit f000b512 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

fix to_top button

parent c0b4f6e1
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,8 @@ export default ({
},
to_top: function() {
let first = document.getElementById("title_0")
if (first) first.focus();
window.scrollTo(0,0)
}
......
......@@ -36,7 +36,7 @@
</li>
</ul>
</div>
<Pagination v-if="scrolled" @update-page="$emit('update-page')" bottom/>
<Pagination @update-page="$emit('update-page')" bottom/>
</section>
......@@ -55,11 +55,6 @@ export default {
lang: String,
meta: Object
},
data: () => {
return {
scrolled: false
}
},
computed: {
right_col_class_name: function() {
if (this.$vuetify.breakpoint.mdAndUp) {
......@@ -107,15 +102,7 @@ export default {
details_click: function(item) {
this.$emit('details-click', item)
},
detect_scroll: function() {
window.onscroll = () => {
this.scrolled = window.pageYOffset > window.innerHeight
}
}
},
mounted() {
this.detect_scroll()
},
components: {
Article,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment