From 3257cd534b9ce12279a06f7c80516d2b106853f3 Mon Sep 17 00:00:00 2001 From: Daniel Ludwig Date: Sun, 17 Mar 2024 15:50:38 +0100 Subject: [PATCH] added smooth scroll bahavior to popover-container --- pages/index.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 18d48d6..3e4275a 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -18,6 +18,7 @@ const loading = ref(false) const isOpen = ref(false) const currentLink = ref('') const open = ref(false) +const popover = ref(null) const formState = reactive({ search: '', @@ -78,6 +79,10 @@ function toggleTldPicker() { return a > b ? 1 : -1 }) + setTimeout(() => { + popover.value?.scrollIntoView({ behavior: 'smooth' }) + }, 200) + search.value = '' } @@ -91,7 +96,10 @@ async function fetchTLDs(input: any = null): Promise { ) if (fetchError.value || !data.value) { - console.error('Failed to fetch TLDs, using default TLDs:', fetchError.value) + console.error( + t('notifications.generalError', { returnObjects: true }), + fetchError.value + ) return defaultTlds } @@ -281,6 +289,7 @@ function openLinkModal(domain: string) {