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

239
Visualizações
Safari Mobile - Still getting prompted to block popup despite setting block popup to false

In my safari browser on iPhone 11, I have "block popups" turned off. However with the following line of angular code, I am still getting prompted a pop-up message:

This site is attempting to open pop-up window

Here is the line of code I am using on click:

this.service1.url(this.Method1()).subscribe( response => { window.open('www.google.com', '_blank');} );

What am I missing, or is there a workaround?

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

0

This might be occurring if the opening of the new tab isn't the result of a user initiated event, or if there's an async delay after the user event

Details from JavaScript.info

// Most browsers block popups if they are called outside of user-triggered event handlers like onclick.

// For example:

// popup blocked
window.open('https://javascript.info');

// popup allowed
button.onclick = () => {
  window.open('https://javascript.info');
};
// This way users are somewhat protected from unwanted popups, but the functionality is not disabled totally.
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