diff --git a/src/extensions/surveys.ts b/src/extensions/surveys.ts index b15c8c26e..52f783be7 100644 --- a/src/extensions/surveys.ts +++ b/src/extensions/surveys.ts @@ -741,7 +741,7 @@ export const callSurveys = (posthog: PostHog, forceReload: boolean = false) => { }) } const countdownEl = thankYouElement.querySelector('.thank-you-message-countdown') - if (countdownEl) { + if (survey.appearance?.autoDisappear && countdownEl) { let count = 3 countdownEl.textContent = `(${count})` const countdown = setInterval(() => { diff --git a/src/posthog-surveys-types.ts b/src/posthog-surveys-types.ts index b8b986257..30b122b9f 100644 --- a/src/posthog-surveys-types.ts +++ b/src/posthog-surveys-types.ts @@ -9,12 +9,14 @@ export interface SurveyAppearance { backgroundColor?: string submitButtonColor?: string textColor?: string + // deprecate submit button text eventually submitButtonText?: string descriptionTextColor?: string ratingButtonColor?: string ratingButtonActiveColor?: string ratingButtonHoverColor?: string whiteLabel?: boolean + autoDisappear?: boolean displayThankYouMessage?: boolean thankYouMessageHeader?: string thankYouMessageDescription?: string