[BUGFIX] Fullscreen firefox legacy & chrome
This commit is contained in:
parent
25212adb81
commit
e1d3a3d7b2
@ -178,17 +178,17 @@ define({
|
|||||||
ctx.fill();
|
ctx.fill();
|
||||||
},
|
},
|
||||||
fullscreen: function fullscreen(btn) {
|
fullscreen: function fullscreen(btn) {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement) {
|
||||||
var fel = document.firstElementChild;
|
var fel = document.firstElementChild;
|
||||||
var func = fel.requestFullscreen
|
var func = fel.requestFullscreen
|
||||||
|| fel.webkitRequestFullScreen
|
|| fel.webkitRequestFullScreen
|
||||||
|| fel.msRequestFullscreen;
|
|| fel.mozRequestFullScreen;
|
||||||
func.call(fel);
|
func.call(fel);
|
||||||
btn.classList.add('ion-full-exit');
|
btn.classList.add('ion-full-exit');
|
||||||
} else {
|
} else {
|
||||||
func = document.exitFullscreen
|
func = document.exitFullscreen
|
||||||
|| document.webkitexitFullscreen
|
|| document.webkitExitFullscreen
|
||||||
|| document.msexitFullscreen;
|
|| document.mozCancelFullScreen;
|
||||||
if (func) {
|
if (func) {
|
||||||
func.call(document);
|
func.call(document);
|
||||||
btn.classList.add('ion-full-enter');
|
btn.classList.add('ion-full-enter');
|
||||||
|
Loading…
Reference in New Issue
Block a user