Skip to content

Commit d4cc443

Browse files
committed
Merge pull request #3652 from AnalyticalGraphicsInc/fullscreen-fix
Fix fullscreen in firefox
2 parents d672e30 + 72ed905 commit d4cc443

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Source/Core/Fullscreen.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ define([
173173

174174
// casing of Fullscreen differs across browsers
175175
name = prefix + 'FullscreenEnabled';
176-
if (defined(document[name])) {
176+
if (document[name] !== undefined) {
177177
_names.fullscreenEnabled = name;
178178
} else {
179179
name = prefix + 'FullScreenEnabled';
180-
if (defined(document[name])) {
180+
if (document[name] !== undefined) {
181181
_names.fullscreenEnabled = name;
182182
}
183183
}
@@ -188,7 +188,7 @@ define([
188188
_names.fullscreenElement = name;
189189
} else {
190190
name = prefix + 'FullScreenElement';
191-
if (defined(document[name])) {
191+
if (document[name] !== undefined) {
192192
_names.fullscreenElement = name;
193193
}
194194
}

Source/Scene/FrameRateMonitor.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ define([
103103
update(that, time);
104104
});
105105

106-
this._hiddenPropertyName = defined(document.hidden) ? 'hidden' :
107-
defined(document.mozHidden) ? 'mozHidden' :
108-
defined(document.msHidden) ? 'msHidden' :
109-
defined(document.webkitHidden) ? 'webkitHidden' : undefined;
110-
111-
var visibilityChangeEventName = defined(document.hidden) ? 'visibilitychange' :
112-
defined(document.mozHidden) ? 'mozvisibilitychange' :
113-
defined(document.msHidden) ? 'msvisibilitychange' :
114-
defined(document.webkitHidden) ? 'webkitvisibilitychange' : undefined;
106+
this._hiddenPropertyName = (document.hidden !== undefined) ? 'hidden' :
107+
(document.mozHidden !== undefined) ? 'mozHidden' :
108+
(document.msHidden !== undefined) ? 'msHidden' :
109+
(document.webkitHidden !== undefined) ? 'webkitHidden' : undefined;
110+
111+
var visibilityChangeEventName = (document.hidden !== undefined) ? 'visibilitychange' :
112+
(document.mozHidden !== undefined) ? 'mozvisibilitychange' :
113+
(document.msHidden !== undefined) ? 'msvisibilitychange' :
114+
(document.webkitHidden !== undefined) ? 'webkitvisibilitychange' : undefined;
115115

116116
function visibilityChangeListener() {
117117
visibilityChanged(that);

0 commit comments

Comments
 (0)