diff --git a/src/components/Componentes/question-birthplace.tsx b/src/components/Componentes/question-birthplace.tsx index bc10c05..ea99112 100644 --- a/src/components/Componentes/question-birthplace.tsx +++ b/src/components/Componentes/question-birthplace.tsx @@ -285,6 +285,7 @@ export function QuestionBirthplace({ if (resolvedC || updated.city) { setDetectedLocation([updated.city, resolvedC].filter(Boolean).join(", ")); } + lastInternalAnswerRef.current = typeof rawValue === "string" ? rawValue : null; }, [rawValue, locale]); const options = getCountryList(locale); @@ -299,6 +300,7 @@ export function QuestionBirthplace({ setSelectedCountry(country); closeSheet(); updateAnswers(country, cityInput); + setDetectedLocation([cityInput, country].filter(Boolean).join(", ")); window.setTimeout(() => { cityInputRef.current?.focus({ preventScroll: true }); }, EXIT_ANIMATION_MS); @@ -311,6 +313,7 @@ export function QuestionBirthplace({ const newCity = e.target.value; setCityInput(newCity); updateAnswers(selectedCountry, newCity); + setDetectedLocation([newCity, selectedCountry].filter(Boolean).join(", ")); }; const isRtl = locale === "fa" || locale === "ar" || locale === "ur";