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

230
Vistas
element.requestFullscreen() not working in electron 18.2

I have a VueJS2 app inside Electron 18.2 and and I want to make a div full screen when the user presses a button.

I am using this code

 console.log("fullscreenEnabled", document.fullscreenEnabled)
  if (!document.fullscreenElement) {
    if (this.$refs["container"].requestFullscreen) {
      this.$refs["container"]
        .requestFullscreen()
        .then(() => console.log("fullscreen works"))
        .catch(e => console.log("toggleFullscreen error", e))
    }
  } else {
    console.log("exit")
    if (document.exitFullscreen) {
      document.exitFullscreen()
    }
  }

this.$refs["container"] is the div I want to full screen and it has value document.fullscreenEnabled returns true

I tested this code in a clean electron project of the same version and there it works, 100% the same code.

What happens is that nothing is displayed in console and the div doesn't go fullscreen, neither then or catch triggers, there are no actions when clicking on the button. The method is called with @click="toggleFullScreen"

What could be the cause ? Does electron has some settings that could have been changed to block the fullscreen API ? I didn't made the project, I just have to add this function to it.

The projoect is made with VueJS2, Nuxt2, Electron 18.2 and Vuetify

Thank you.

about 4 years ago · Juan Pablo Isaza
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