Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

84
Visualizações
Updating Google Maps steals focus from form elements

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.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda