We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b90d7b2 commit 1e7cd98Copy full SHA for 1e7cd98
1 file changed
src/core/Stage.js
@@ -226,7 +226,11 @@ Phaser.Stage.prototype.updateTransform = function () {
226
*/
227
Phaser.Stage.prototype.checkVisibility = function () {
228
229
- if (document.webkitHidden !== undefined)
+ if (document.hidden !== undefined)
230
+ {
231
+ this._hiddenVar = 'visibilitychange';
232
+ }
233
+ else if (document.webkitHidden !== undefined)
234
{
235
this._hiddenVar = 'webkitvisibilitychange';
236
}
@@ -238,10 +242,6 @@ Phaser.Stage.prototype.checkVisibility = function () {
238
242
239
243
this._hiddenVar = 'msvisibilitychange';
240
244
241
- else if (document.hidden !== undefined)
- {
- this._hiddenVar = 'visibilitychange';
- }
245
else
246
247
this._hiddenVar = null;
0 commit comments