Closed Bug 1688584 Opened 9 months ago Closed 3 months ago

Cancel full-screen using ESC key


(Core :: Widget: Cocoa, enhancement, P2)




92 Branch
Tracking Status
firefox92 --- verified


(Reporter: mbalfanz, Assigned: spohl)



(Whiteboard: [mac:fullscreen:native-affected][mac:fullscreen:nonnative-affected])


(1 file)

On Mac, the ESC key cancels full-screen. This is true for Safari as well as other native applications like Finder, Keynote etc. The feature is documented here (search for "exit full-screen").

We should consider doing the same.

Comment via :mstange:

in Safari, ESC seems to cancel pageload when a page is loading, but if there's nothing to cancel, it exits fullscreen. Safari probably also checks whether the page handled the key event.

Severity: -- → S2
Priority: -- → P2
Whiteboard: [mac:fullscreen]
Whiteboard: [mac:fullscreen] → [mac:fullscreen:native-affected][mac:fullscreen:nonnative-affected]
Assignee: nobody → spohl.mozilla.bugs
Pushed by
Add the ability to exit window fullscreen on macOS by pressing the escape key. r=mstange
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
See Also: → 1720889
See Also: → 1720890
Regressions: 1720959

Hello! Verified fixed with 92.0a1 (20210720215601) on macOS 10.15 and 11.4. Fullscreen is closed while using the ESC key. However, I have found that fullscreen is not closed if the Address bar is focused (bug 1720890) or if native-fullscreen is on false after an update (bug 1720889). Closing this as verified because we can track the remaining issues on the other bugs.


This change is so disruptive to my workflow that I'm on bugzilla at 2am looking for why it happened. Please make it configurable, suggest a reasonable workaround*, or revert it.

Safari is the odd browser here, as Chrome doesn't have this behavior either.

I've run Nightly for several years now and this is apparently what it takes to overcome the inertia and actually comment on a bug.

*In an attempt to be constructive: per the comment in the diff, I take issue with step 3. Can an extension bind a noop to the escape key in a way that happens after step 2 and prevents the key event from reaching step 3?

Thanks for the feedback. I'll discuss this with the team.

I have to agree with Colin in Comment #5, this has been very disruptive for my workflow as well. At this point, mashing the escape key to get out of modals or other page elements is muscle memory that continually resets my window layout. If this could be configurable or opt-in it would be greatly appreciated.

Regressions: 1725884
See Also: 1725884

The feature doesn't behave as intended. It exists full screen situations where it shouldn't.

We'll move it behind a pref asap and will then revisit it.

Depends on: 1726810
Blocks: 1732367
You need to log in before you can comment on or make changes to this bug.