Logical like #169, move the judgment code to toggle

This commit is contained in:
Karl Chen
2017-12-16 11:18:08 +08:00
committed by GitHub
parent 058ba442b6
commit 018ed245d6
+15 -2
View File
@@ -92,9 +92,22 @@ class FullScreen {
this.cancel(type);
}
else {
this.request(type);
switch (type) {
case 'browser':
this.request('browser');
if (this.isFullScreen('web')) {
this.cancel('web');
}
break;
case 'web':
this.request('web');
if (this.isFullScreen('browser')) {
this.cancel('browser');
}
break;
}
}
}
}
module.exports = FullScreen;
module.exports = FullScreen;