diff --git a/js/h5p.js b/js/h5p.js index b9d70f6..b2d13b3 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -501,8 +501,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull // We're called from an iframe. $body = H5P.jQuery(body); $classes = $body.add($element.get()); - var contentId = $element.closest('[data-content-id]').data('content-id'); - var iframeSelector = '#h5p-iframe-' + contentId; + var iframeSelector = '#h5p-iframe-' + $element.parent().data('content-id'); $iframe = H5P.jQuery(iframeSelector); $element = $iframe.parent(); // Put iframe wrapper in fullscreen, not container. }