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

108
Visualizações
Detect & prevent opening new tabs inside Chrome Custom Tabs

Background:

  • Our webapp has a feature that sends links by email to users.
  • When clicked inside the email, the link should open our webapp.
  • Our webapp (window A) includes a few actions that create new tabs because the content cannot be rendered inside an iFrame (window B)
  • window A and window B communicate using postMessage.

Problem: On Android devices, using the Gmail app, clicking/tapping links in emails open the resulting page inside a Chrome Custom Tab browser that properly displays Window A.

However, opening window B will position it over window A. While postMessage between the two browsing contexts is working there is no way for the user to return to Window A. Back arrow in the browser will return user to Gmail app.

We'd like to detect this situation and gracefully fallback so the user doesn't find themselves stranded on Window B - as we do for other non-multi-tab browsers like WebViews (Facebook, etc).

Seems that Chrome Custom Tabs uses the exact same user agent as "regular" multi-tab Chrome browser so that's not an option.

Would appreciate if anyone has figured out a way to detect loading through Chrome Custom Tabs

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

0

Custom Tabs and Trusted Web Activity are largely the same protocol. The solution described in How can I detect if my website is opened inside a Trusted Web Actvity? should work for Custom Tabs too.

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