Test autofill on clicking outside of address field 1
This commit is contained in:
parent
94eba9e7fe
commit
91dc1b8d03
1 changed files with 7 additions and 0 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue