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

176
Views
Webkit browser fullscreen request changes body colour and removes console

I am currently preparing a website which should switch the full website to fullscreen upon user request. I use the following function:

launchFullScreen(document.documentElement);

function launchFullScreen(element) {
  if(element.requestFullScreen) {
    element.requestFullScreen();
  } else if(element.mozRequestFullScreen) {
    element.mozRequestFullScreen();
  } else if(element.webkitRequestFullScreen) {
    element.webkitRequestFullScreen();
  }
}

Everything works fine in Edge, Chrome and FF, yet on Safari the body colour of my website gets turned from black to white - also the console of the browser becomes black so I cannot really see what's happening there. Any ideas?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Turns out Safari somehow changed the background colour upon fullscreen request. Adding the following to the CSS of the page solved the issue:

    html:-webkit-full-screen {
        background-color: black !important;
    }
about 4 years ago · Juan Pablo Isaza Report
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!