Awesome! While this is certainly an improvement, I just uncovered one more tiny-ish bug.
With the snippet above being used instead of the old change code, if you have a pre-populated field and click on the address and change it to a new location from the drop-down, it does not trigger page reload warning, although it should. The “change” function is being called, so why is there no message?
Personally, I’m the type of person to always hit the update button but sometimes people won’t and we should account for that.
I’ve made a short video showing the problem. If you watch my dev tools, every time the window moves, a “Change” is triggered in the console (I added it). However, it only shows the message for changes that occur by clicking the map/marker.
You will notice that the map also triggers 2 change console logs on load.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!