Infocatcher / Sidebars_List

Adds drop-down list to switch sidebars, restartless extension for Firefox
https://addons.mozilla.org/firefox/addon/sidebars-list/
Other
1 stars 1 forks source link

Unable to detect DOM fullscreen in Firefox 41+ #12

Closed Infocatcher closed 9 years ago

Infocatcher commented 9 years ago

See https://github.com/Infocatcher/Sidebars_List/issues/4#issuecomment-31327823 for testcase. Looks like since Firefox 41+ "sizemodechange" event isn't enough to track changes.

Infocatcher commented 9 years ago

chrome://browser/content/browser.js (Firefox 41.0.1):

var FullScreen = {
  ...
  init: function() {
    // called when we go into full screen, even if initiated by a web page script
    window.addEventListener("fullscreen", this, true);

So, we can use "fullscreen" event.

Infocatcher commented 9 years ago

Oh, strange. All works fine, but we have fullscreen mode (window.fullScreen == true) with document.mozFullScreen == false (and therefore we track this as regular fullscreen). And document.mozFullScreen becomes true after some delay.