I have a google maps embed on my site, which I'd like to update with the user's current location. It's non-interactive but when I change the coordinates like this, where pos is a coordinates object:
map.setCenter(pos);
The map will steal focus from any other form elements on the page. Eg: If I have a text field focused and am typing, and the location updates the text field will lose focus and I'll be typing into nothing.
Is there a good way to fix this? I have no clue what I could do.
Nevermind, I realized I was calling mapwindow.open(map) on a window object which was stealing focus. Lesson learned, setting the map center doesn't steal focus, opening an attachment on the map does.