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