Skip to content

Commit

Permalink
Merge pull request #78 from beabee-communityrm/fix/1194-scroll-form-t…
Browse files Browse the repository at this point in the history
…o-top

fix: scroll form to top on next slide
  • Loading branch information
wpf500 authored Nov 14, 2024
2 parents b8ce93d + 2fdf5c2 commit e256023
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/frontend/src/components/pages/callouts/CalloutForm.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<form :class="formClass" @submit.prevent>
<form ref="formEl" :class="formClass" @submit.prevent>
<FormRenderer
v-for="slide in visibleSlides"
:key="slide.id"
Expand Down Expand Up @@ -104,6 +104,7 @@ const captchaToken = ref('');
const formError = ref('');
const isLoading = ref(false);
const formEl = ref<HTMLFormElement>();
const formClass = computed(() => [
'callout-form',
{
Expand Down Expand Up @@ -216,6 +217,8 @@ function handleNextSlide() {
}
slideIds.value.unshift(nextSlideId);
formEl.value?.scrollIntoView();
}
function handlePrevSlide() {
Expand Down

0 comments on commit e256023

Please sign in to comment.