@@ -16,7 +16,11 @@ watch(
|
||||
() => sectionRef.value && props.isNextActiveSection,
|
||||
(isNextActiveSection) => {
|
||||
if (isNextActiveSection) {
|
||||
sectionRef.value?.querySelector('input[type="text"]')?.focus()
|
||||
const input = sectionRef.value?.querySelector('input[type="text"]')
|
||||
if (input instanceof HTMLInputElement) {
|
||||
input.focus()
|
||||
}
|
||||
|
||||
sectionRef.value?.scrollIntoView({ behavior: 'smooth' })
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user