diff --git a/nuxt/app.vue b/nuxt/app.vue index 503788a..cfff88b 100644 --- a/nuxt/app.vue +++ b/nuxt/app.vue @@ -83,6 +83,7 @@ background: none; text-decoration: underline; width: fit-content; + z-index: 100; } footer { diff --git a/nuxt/components/Pojem.vue b/nuxt/components/Pojem.vue index 84ed8d9..a6068f6 100644 --- a/nuxt/components/Pojem.vue +++ b/nuxt/components/Pojem.vue @@ -3,6 +3,8 @@ import { stripHtml } from 'string-strip-html' const { etherFetch } = useEtherpadApi() +const { poskrolaj } = useUi() + const store = usePojmiStore() const route = useRoute() @@ -40,16 +42,15 @@ onMounted(() => { // Link na editiranje pojma? Poskrolaj nanj + odpri editiranje if (route.params.guid === revisionId.value) { urejanje.value = true - setTimeout(() => obrazec.value.scrollIntoView({ behavior: 'smooth' }), 50) } else { // Sicer samo poskrolaj na pojem - setTimeout(() => { - const sekcija = container.value.parentNode - console.log('skrolam?', sekcija) - if (sekcija) { - sekcija.scrollIntoView({ behavior: 'smooth' }) - } - }, 50) + poskrolaj(container.value.parentNode) + } +}) + +onUpdated(() => { + if (route.params.guid === revisionId.value) { + poskrolaj(obrazec.value) } }) @@ -62,11 +63,13 @@ onMounted(() => {