From 886c631461f0b0d36506b027309559ec776cf8d1 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 22 Apr 2015 10:58:59 +0200 Subject: [PATCH 1/2] Use correct variable. --- js/h5p.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index b77a113..16648c1 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1636,7 +1636,7 @@ H5P.createTitle = function(rawTitle, maxLength) { // Cache in preloaded if (content.contentUserData === undefined) { - content.contentUserData = preloaded = {}; + content.contentUserData = preloadedData = {}; } if (preloadedData[subContentId] === undefined) { preloadedData[subContentId] = {}; From 260b6fe044a0488a30ceae2a63f8cc1e2df7721b Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Wed, 22 Apr 2015 12:55:18 +0200 Subject: [PATCH 2/2] Restrict IE FullScreen. --- js/h5p.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/h5p.js b/js/h5p.js index 16648c1..9b38d5e 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -67,7 +67,11 @@ H5P.init = function (target) { // Determine if we can use full screen if (H5P.canHasFullScreen === undefined) { - H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) ? true : false) : true; + // Restricts fullscreen when embedded. + // (embedded doesn't support semi-fullscreen solution) + H5P.canHasFullScreen = (H5P.isFramed && H5P.externalEmbed !== false) ? ((document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled) ? true : false) : true; + // We should consider document.msFullscreenEnabled when they get their + // element sizing corrected. Ref. https://connect.microsoft.com/IE/feedback/details/838286/ie-11-incorrectly-reports-dom-element-sizes-in-fullscreen-mode-when-fullscreened-element-is-within-an-iframe } // H5Ps added in normal DIV.