diff --git a/source/Ox.UI/css/theme.css b/source/Ox.UI/css/theme.css index 90908815..7abdf260 100644 --- a/source/Ox.UI/css/theme.css +++ b/source/Ox.UI/css/theme.css @@ -1,13 +1,3 @@ -html:fullscreen { - background-color: $bodyBackground; -} -html:-moz-full-screen { - background-color: $bodyBackground; -} -html:-webkit-full-screen { - background-color: $bodyBackground; -} - body.$themeClass { background-color: $bodyBackground; } diff --git a/source/Ox.UI/js/Core/Fullscreen.js b/source/Ox.UI/js/Core/Fullscreen.js index d42ee5a7..b0dcac69 100644 --- a/source/Ox.UI/js/Core/Fullscreen.js +++ b/source/Ox.UI/js/Core/Fullscreen.js @@ -21,10 +21,10 @@ Ox.Fullscreen Fullscreen controller Ox.Fullscreen = (function() { - var documentElement = document.documentElement, - enter = document.documentElement.requestFullscreen - || document.documentElement.mozRequestFullScreen - || document.documentElement.webkitRequestFullscreen, + var documentElement = document.body, + enter = document.body.requestFullscreen + || document.body.mozRequestFullScreen + || document.body.webkitRequestFullscreen, exit = document.exitFullscreen || document.mozCancelFullScreen || document.webkitExitFullscreen, @@ -86,8 +86,9 @@ Ox.Fullscreen = (function() { } that.available = document.fullscreenEnabled - || document.webkitFullscreenEnabled - || document.mozFullScreenEnabled || false; + || document.webkitFullscreenEnabled + || document.mozFullScreenEnabled + || false; that.bind = function(event, handler) { bind(event, handler); @@ -98,15 +99,16 @@ Ox.Fullscreen = (function() { }; that.enter = function() { - if (document.documentElement.requestFullscreen) { - document.documentElement.requestFullscreen(); - } else if (document.documentElement.mozRequestFullScreen) { - document.documentElement.mozRequestFullScreen(); - } else if (document.documentElement.webkitRequestFullscreen) { - document.documentElement.webkitRequestFullscreen(); + if (document.body.requestFullscreen) { + document.body.requestFullscreen(); + } else if (document.body.mozRequestFullScreen) { + document.body.mozRequestFullScreen(); + } else if (document.body.webkitRequestFullscreen) { + document.body.webkitRequestFullscreen(); } // FIXME: Why does storing the function in a variable not work? // enter && enter(); + // ^ Missing `this` binding }; that.exit = function() { @@ -119,6 +121,7 @@ Ox.Fullscreen = (function() { } // FIXME: Why does storing the function in a variable not work? // exit && exit(); + // ^ Missing `this` binding }; that.getState = function() {