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

154
Visualizações
Closing the keyboard in Safari 15 on iPhone raises the window.blur event

Closing the keyboard in Safari 15 on an iPhone triggers the window.blur event. The problem is that the application must also listen for the window.blur event to send information that the user has minimized the application and closing the keyboard causes a false positive. Is it possible to somehow separate these cases?

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

0

You can use combination of VisibilityChange and BeforeUnload events to trigger when user minimises or navigates away from the website.

document.addEventListener("visibilitychange", (event) => { 
  // check visibilityState
  if(document.visibilityState === 'visible') {
    //.. do stuff
  } else { 
     // .. do something else
  }
});

document.addEventListener('beforeunload', () => {
 // Your logic goes here
});

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