Skip to content

Commit 5987cbf

Browse files
committed
use fullscreenElement for determining on/off fullscreen mode instead of fullscreenEnabled
1 parent 2231632 commit 5987cbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cocos2d/core/platform/CCScreen.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ cc.screen = /** @lends cc.screen# */{
9292
}
9393
}
9494

95-
this._supportsFullScreen = (this._fn.requestFullscreen != undefined);
95+
this._supportsFullScreen = (this._fn.requestFullscreen != undefined);
9696
this._touchEvent = ('ontouchstart' in window) ? 'touchstart' : 'mousedown';
9797
},
9898

@@ -101,7 +101,7 @@ cc.screen = /** @lends cc.screen# */{
101101
* @returns {Boolean}
102102
*/
103103
fullScreen: function() {
104-
return this._supportsFullScreen && document[ this._fn.fullscreenEnabled ];
104+
return this._supportsFullScreen && document[this._fn.fullscreenElement];
105105
},
106106

107107
/**

0 commit comments

Comments
 (0)