True Full Screen in Firefox?

In OSX, how do I have a true full screen? When I go to full screen mode, the tab and navigation bar are still showing. Those toolbars are annoying when I try to watch a movie, etc.

This is the shot of the top of the screen:enter image description here

EDIT: I realized this may apply to other browsers such as Safari


On the about:config page search for the following key

full-screen-api.allow-trusted-requests-only

and set it to false

Then you can create a bookmark 'link' with the following 'location':

javascript:document.documentElement.requestFullscreen()

Edit: new FF supports shorter syntax, thanks @trss for suggestion


By default there's no way to do this in native Firefox, but there is an extension called Toolbar Autohide that should do exactly that! It allows you to use your mouse to make it appear again by hovering at the top of the screen where the toolbar would normally be.

Simply install the extension at that link and restart Firefox when it prompts you to do so. After Firefox restarts, right-click the toolbar and select Maximized Autohide; you should then be ready to go!

I would recommend changing an option for the add-on in the add-on manager (command + shift + a), though: under General, change Transition Type to Slide-in to make it a little prettier.

Lastly, keep in mind that hovering your mouse at the top of the screen can make the OS X bar appear as well, which can be mildly annoying (which would happen for almost any extension that does this type of thing). To get around this, make good use of key commands!

  • command + l brings up the address bar so you can immediately start typing in a new URL
  • command + k brings up the Firefox menu so you can select your print options, preferences, etc.
  • command + t creates a new tab and focuses on it
  • control + tab and control + shift + tab allows you to cycle through tabs just like command + tab and command + shift + tab allows you to cycle through windows in OS X

Hope this helps!


I solved this by using Automator to create an Application that makes use of an Action > Utilities > Run Shell Script:

open -a Firefox
sleep 1
lsappinfo setinfo -app Firefox ApplicationType=UIElement
osascript -e 'tell application "System Events" to tell process "Firefox" to set value of attribute "AXFullScreen" of first window to true'
sleep 0.5
for f in "$@"; do open -a Firefox "$f"; done

I set the shell script Shell: to /bin/sh and Pass input: to as arguments, save it as "Firefox Full Screen" in /Applications, change its icon as explained here and add it as an exception in System Preferences > Security & Privacy > Privacy Tab > Accessibility.

I then can click the application icon or run any of the following and it works:

  • open -a "Firefox Full Screen"
  • open -a "Firefox Full Screen" --args "https://google.com"
  • open -a "Firefox Full Screen" --args "https://google.com" "https://twitter.com"

I'm using this coupled with the following userChrome.css to both evade a well known issue with the macOS menu bar on full screen applications and another long standing address bar and tab auto-hide bug that Firefox have with macOS native full screen.

userChrome.css

#navigator-toolbox[inFullscreen] {
    position: relative;
    z-index: 1;
    height: 3px;
    margin-bottom: -3px;
    opacity: 0;
    overflow: hidden;
}

#navigator-toolbox[inFullscreen]:hover {
    height: auto;
    margin-bottom: 0px;
    opacity: 1;
    overflow: show;
}

#content-deck[inFullscreen]{
    position:relative;
    z-index: 0;
}

For a generic approach, check my other answer.

TIP

  • Firefox, by default, does not have any issue on Linux or Windows to auto-hide address bar and tabs in full screen as expected. With that said, I grabbed this userChrome.css from my ArchLinux setup. I use it on i3 and sway tiling window managers, with all the [inFullscreen] removed, to get address bar and tabs to auto-hide in normal bordless windows.

One way to do this is by using JavaScript. For Firefox, execute this code:

document.getElementsByTagName('html')[0].mozRequestFullScreen()

On Safari, put this in a button href attribute:

javascript:if(!document.webkitFullscreenElement){document.getElementsByTagName('html')[0].webkitRequestFullscreen();} else{document.webkitExitFullscreen()}

Obviously, this isn't very graceful unless in an extension or bookmarklet.