Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!