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

309
Visualizações
Why does maximized Chrome report its display-mode as 'fullscreen'?

In my web app, I need to know whether I can open a new window or not (e.g. with target='_blank'). I can safely open a new window when running in a browser, but not when running as a PWA (in standalone mode).

To test whether I can open a new window, I'm using the display-mode media query, like this:

document.body.innerText = 'Your display-mode is ' +JSON.stringify(
  ['fullscreen', 'standalone', 'minimal-ui', 'browser'].filter(
    mode => window.matchMedia(`(display-mode: ${mode})`).matches))

This works in Firefox and Safari, which both report the mode browser. But Chrome, when its window is maximized, reports the mode fullscreen! This doesn't make sense, because the meaning of fullscreen is "All of the available display area is used and no user agent chrome is shown."

Questions:

  1. Is this a bug in Chrome? Should it not always report the mode browser?
  2. Is there a less hacky way I can test for the ability to open a new window?
about 4 years ago · Juan Pablo Isaza
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