mozilla / chromeless

DEPRECATED - Build desktop applications with web technologies.
http://mozillalabs.com/chromeless
760 stars 129 forks source link

require("fullscreen").toggle turns full screen against any active window, not the current app window #74

Closed taboca closed 13 years ago

taboca commented 13 years ago

This bug was found from the new tests framework. The tests framework launches a test window, which is a small window that says " running tests.. " and then it opens chromeless. The ./tests/fullscreen/index.html was calling require("fullscreen").toggle. It toggles the "tests" window instead Chromeless, test failed because current test does a check of window.innerWidth before the document loaded, against window.innerWidth after half second after page onload.

AFAIK this was working in the past using the reference to the current window. Maybe a regression.

taboca commented 13 years ago

require("fullscreen") functions accept the reference to the window. This is less elegant but it works as expected -- we also need to remember that Chromeless apps will have multiple windows soon.

To make pretty, we could workout some other injected object under the window, maybe hook up a setter against the fullScreen properly in the chromeless developer app window space.

It's also important to remember that with system-level privileges, the standard fullScreen properly should work.

sha: 41689e9e5ab2f436c5523eecd87f7a7dd6efc5d9