From 9f721f5be2570b6d8398dee509ddb08b4fea681f Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Wed, 23 Oct 2013 01:32:54 +0900 Subject: [PATCH] Re-show the tab bar correctly after exitting DOM fullscreen mode by F11 (#576) --- modules/browser.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index c77a0090..30f82226 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -4813,16 +4813,17 @@ TreeStyleTabBrowser.prototype = { onBeforeFullScreenToggle : function TSTBrowser_onBeforeFullScreenToggle() { if (this.position != 'top') { + var isEnteringFullScreenMode = !this.window.fullScreen; // entering to the DOM-fullscreen (ex. YouTube Player) - if (this.document.mozFullScreen) { + if (this.document.mozFullScreen && isEnteringFullScreenMode) { this.setTabbrowserAttribute(this.kDOM_FULLSCREEN_ACTIVATED, true); } else { if (this.document.documentElement.getAttribute(this.kDOM_FULLSCREEN_ACTIVATED) != 'true') { - if (this.window.fullScreen) - this.autoHide.endForFullScreen(); - else + if (isEnteringFullScreenMode) this.autoHide.startForFullScreen(); + else + this.autoHide.endForFullScreen(); } this.removeTabbrowserAttribute(this.kDOM_FULLSCREEN_ACTIVATED); }