diff --git a/src/fullscreen.js b/src/fullscreen.js index 3af79a6..e8d48b2 100644 --- a/src/fullscreen.js +++ b/src/fullscreen.js @@ -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; \ No newline at end of file +module.exports = FullScreen;