doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 8 forks source link

Choosing an address from the auto-complete list fails to separate the address into it's parts, leaving the full address in the `street1` field #41

Open stevecomrie opened 2 years ago

stevecomrie commented 2 years ago

Steps to re-create:

  1. Create or edit any entry that has an Address field associated with it.
  2. Start typing an address like: 100 Main Street.
  3. Choose an option from the auto-complete list, and everything works fine.
  4. Re-focus on the street1 field and choose a different option, and everything works fine.
  5. If you make a different selection from the auto-complete list each time you re-enter the field, everything works fine, but if you make the same selection twice in a row, the auto-complete field populates "street1" with the full address / city / state / country.

One caveat that I noticed is that if you make a change to any other part of the location address in-between making the same selection twice in a row, then everything seems to work normally.

The bug only appears if you make a choice, then re-enter the street1 field, and make the same choice again from the auto-complete list.

I've only experienced this bug through the admin panel. The code provided to re-create the auto-complete functionality on the front-end doesn't have the same issue.

https://user-images.githubusercontent.com/684903/139946421-d9477476-c4a1-43ee-8f67-4eaa6d7bb46f.mp4

lindseydiloreto commented 2 years ago

Note to self... Chatted with Andrew about a possible solution to this issue. Check Discord DMs from today.

laurabennett commented 1 year ago

I'm seeing this same issue with auto complete on front-end forms. I've followed the documentation and my ids match accordingly with the js.