From 1c12b7bbf72e09d3799b0b9ffd660c80b67627c0 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 12 May 2021 12:10:51 +0200 Subject: [PATCH] Fix check/use of incorrect API function This will solve fullscreen issues in Firefox --- js/h5p.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index 05cd853..c374b0c 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -23,7 +23,7 @@ H5P.$window = H5P.jQuery(window); H5P.instances = []; // Detect if we support fullscreen, and what prefix to use. -if (document.documentElement.requestFullScreen) { +if (document.documentElement.requestFullscreen) { /** * Browser prefix to use when entering fullscreen mode. * undefined means no fullscreen support. @@ -676,7 +676,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull }); if (H5P.fullScreenBrowserPrefix === '') { - $element[0].requestFullScreen(); + $element[0].requestFullscreen(); } else { var method = (H5P.fullScreenBrowserPrefix === 'ms' ? 'msRequestFullscreen' : H5P.fullScreenBrowserPrefix + 'RequestFullScreen');