Skip to content

Commit

Permalink
Fixed VR fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
toji committed Apr 7, 2015
1 parent c9fb6b9 commit 7f8b633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ function main() {
var viewportFrame = document.getElementById("viewport-frame");
var viewport = document.getElementById("viewport");
document.addEventListener("fullscreenchange", function() {
if(document.fullscreenEnabled) {
if(document.fullscreenElement) {
viewport.requestPointerLock(); // Attempt to lock the mouse automatically on fullscreen
} else {
vrEnabled = false;
Expand Down

0 comments on commit 7f8b633

Please sign in to comment.