Fullscreen exits upon subsequently entering fullscreen if window isn't maximized

RESOLVED FIXED in Firefox 14

Status

()

Firefox
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cpearce, Assigned: cpearce)

Tracking

Trunk
Firefox 14
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Regression from f9c6dbf41832 in Bug 639705.

STR:
1. Load http://pearce.org.nz/full-screen in Firefox nightly on non-MacOSX platform
2. Ensure window is *not* maximized.
3. Press 'f' to enter fullscreen.
4. Press ESC to exit fullscreen.
5. Press 'f' to enter fullscreen.
6. Observe fullscreen exiting as soon as it enters.

Problem is here:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#4086

We're adding the "deactivate" listener |if (!this.useLionFullScreen)|, but we're removing it |if (this.useLionFullScreen)|. Currently on Windows entering fullscreen causes "deactivate" and "activate" events to be dispatched (window is lowered causing "deactivate", window is resized to fullscreen, window is raised causing "activate"), so if the listener (which is added upon first entry to fullscreen) isn't removed on fullscreen exit, entering fullscreen the second time triggers the "deactivate" listener, which kicks us out of fullscreen.

So we should be removing the "deactivate" listener |if (!this.useLionFullScreen)| rather than |if (this.useLionFullScreen)|.
Summary: Fullscreen exits upon subsequent enters if window not maximized → Fullscreen exits upon subsequently entering fullscreen if window isn't maximized
Created attachment 609183 [details] [diff] [review]
Patch

See comment 0 for explanation of fix.
Attachment #609183 - Flags: review?(dao)

Updated

5 years ago
Attachment #609183 - Flags: review?(dao) → review+
Bah, sorry about that. Thanks for catching & fixing!
https://hg.mozilla.org/integration/mozilla-inbound/rev/f21e0d068a12
Target Milestone: --- → Firefox 14

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/f21e0d068a12
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.