From 91dc1b8d0300fc5a2cbfdd968fbbf394e5d241b9 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 21 May 2024 11:21:06 -0400 Subject: [PATCH] Test autofill on clicking outside of address field 1 --- src/fmg-components/address-questions/address-questions.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 0448e32d2..538c8838f 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -269,6 +269,13 @@ export default { window.google.maps.event.trigger(this.autocomplete, "place_changed"); } }); + + // When clicking anywhere outside of the street address field we want to trigger place_changed + document.addEventListener("mouseup", (e) => { + if (e.target.id != "autocomplete" && this.addressField1.value !== "") { + window.google.maps.event.trigger(this.autocomplete, "place_changed"); + } + }); }, findAddressComponentByType(place, componentName, componentLength) { const component = place.address_components.find((component) =>