From d1f58dccf8bd7a93b5039e378f1067f8a43253d0 Mon Sep 17 00:00:00 2001
From: Henrik Askjer <henrik.askjer@uib.no>
Date: Mon, 10 Jan 2022 11:43:42 +0100
Subject: [PATCH] move mount scroll to dictionary view

---
 src/components/Autocomplete.vue   | 3 +--
 src/components/DictionaryView.vue | 5 +++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/components/Autocomplete.vue b/src/components/Autocomplete.vue
index 5ac52700..23deecf6 100644
--- a/src/components/Autocomplete.vue
+++ b/src/components/Autocomplete.vue
@@ -202,8 +202,7 @@
       }
     },
     mounted: function() {
-      if (! this.$route.hash) {
-        window.scrollTo(0,0)
+      if (!this.$route.hash) {
         if(!this.$store.state.noMouse && this.$vuetify.breakpoint.mdAndUp) {
           this.$refs.autocomplete.$refs.input.focus()
         }
diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue
index 5b3147eb..5cf68707 100644
--- a/src/components/DictionaryView.vue
+++ b/src/components/DictionaryView.vue
@@ -500,6 +500,11 @@ export default {
     }
   },
   mounted: function(){
+    if (!this.$route.hash) {
+      window.scrollTo(0,0)
+    }
+
+
     let self = this
     self.lang = self.$route.params.lang || this.$store.state.defaultDict
     if (self.$route.query.pos) {
-- 
GitLab