diff options
author | DerKoun <e-male@web.de> | 2014-03-06 00:28:01 +0100 |
---|---|---|
committer | DerKoun <e-male@web.de> | 2014-03-06 00:28:01 +0100 |
commit | a7aa19e6c018b64998e724e7e4eb0c3e6842d39b (patch) | |
tree | 06c6db7bea657760e1bcabe39a984bcf3e358942 /src | |
parent | 7442be35d2bd1ad20e54397a85f5c2a5bd606c89 (diff) |
Fixed full screen closing immediately
Fixed full screen closing immediately because of canvas container not being defined.
Diffstat (limited to 'src')
-rw-r--r-- | src/library_browser.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/library_browser.js b/src/library_browser.js index 03da394e..a280d1b2 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -348,9 +348,9 @@ mergeInto(LibraryManager.library, { if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; var canvas = Module['canvas']; - var canvasContainer = canvas.parentNode; function fullScreenChange() { Browser.isFullScreen = false; + var canvasContainer = canvas.parentNode; if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || document['mozFullScreenElement'] || document['mozFullscreenElement'] || document['fullScreenElement'] || document['fullscreenElement'] || @@ -369,7 +369,6 @@ mergeInto(LibraryManager.library, { } else { // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen - var canvasContainer = canvas.parentNode; canvasContainer.parentNode.insertBefore(canvas, canvasContainer); canvasContainer.parentNode.removeChild(canvasContainer); |