From b45bfe770bfa3236a2a35e750671fea43ae5132d Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Fri, 6 Mar 2015 12:56:41 +0100 Subject: [PATCH] Critical bug fix for safari --- js/h5p.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index b93d9a7..7ed4074 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -215,12 +215,11 @@ H5P.init = function () { // Insert H5Ps that should be in iframes. H5P.jQuery("iframe.h5p-iframe").each(function () { var contentId = H5P.jQuery(this).data('content-id'); + this.contentWindow.H5P = this.contentWindow.H5P || {}; + this.contentWindow.H5P.externalEmbed = false; this.contentDocument.open(); this.contentDocument.write('' + H5P.getHeadTags(contentId) + '
'); this.contentDocument.close(); - this.contentWindow.H5P = { - externalEmbed: false - }; }); };