diff --git a/src/components/Pagination.vue b/src/components/Pagination.vue index 28fa48c428beeb7f68549cb6aa5fb603d2d41a08..3906eb43bfbf740b31661eae3843200bf152e794 100644 --- a/src/components/Pagination.vue +++ b/src/components/Pagination.vue @@ -31,6 +31,8 @@ export default ({ }, to_top: function() { + let first = document.getElementById("title_0") + if (first) first.focus(); window.scrollTo(0,0) } diff --git a/src/components/SearchResults.vue b/src/components/SearchResults.vue index e8fae709ff6c502169d19ba0c432f558d0110a0f..95a48d39a5e0c08e95adf2a575f23abfff2e8966 100644 --- a/src/components/SearchResults.vue +++ b/src/components/SearchResults.vue @@ -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,