diff --git a/apps/frontend/src/components/create/CreateSection.vue b/apps/frontend/src/components/create/CreateSection.vue index 3338fd4..8eb2ddd 100644 --- a/apps/frontend/src/components/create/CreateSection.vue +++ b/apps/frontend/src/components/create/CreateSection.vue @@ -16,13 +16,14 @@ watch( () => sectionRef.value && props.isNextActiveSection, (isNextActiveSection) => { if (isNextActiveSection) { - sectionRef.value?.scrollIntoView({ behavior: 'smooth', block: 'center' }) + const isSM = window.matchMedia('(min-width: 640px)').matches + sectionRef.value?.scrollIntoView({ behavior: 'smooth', block: isSM ? 'center' : 'start' }) - const input = sectionRef.value?.querySelector('input[type="text"]') + const input = sectionRef.value?.querySelector('input[type="text"][value=""]') if (input instanceof HTMLInputElement) { setTimeout(() => { input.focus() - }, 200) + }, 400) } } },