Firefox: Setting to Prevent Exiting macOS Full Screen Mode with the ESC Key

2026-01-23 11:52 (7 hours ago) ytyng

Problem

On macOS, when a Firefox window is in OS-level fullscreen (the green button), pressing the ESC key exits fullscreen.

This is inconvenient when you want to use ESC for other actions (e.g., closing a modal, closing the search bar, etc.), because you can accidentally exit fullscreen as well.

Solution

Change a setting in about:config.

Steps

  1. Type about:config into Firefox’s address bar and press Enter.
  2. Click “Accept the Risk and Continue.”
  3. In the search bar, type browser.fullscreen.exit_on_escape.
  4. Double-click the value and change it to false.

Setting value

Preference name Default After change
browser.fullscreen.exit_on_escape true false

Notes

Verified environment

Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Archive

2026
2025
2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011