Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Full Screen mode detection in 150% zoom is not working

I am working in react where I have to detect if the web app is in full screen mode or not.

  useEffect(() => {
    function handleResize() {
      setfullScreen(window.innerHeight === window.screen.height)
    }
    window.addEventListener('resize', handleResize)

    return () => window.removeEventListener('resize', handleResize);
  }, []);

Above piece of code works well in normal(100%) zoom and detect if the web app is in full screen mode or not.

But when zoomed to 150% it won't detect the full screen mode.

Is there a better way to detect full screen mode in react which works for all zoom level?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

use this code:

const zoom = window.devicePixelRatio;

setFullscreen(
  window.screen.height === Math.round(window.innerHeight * zoom)
);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda