diff --git a/runtime/scripts/jme-builtins.js b/runtime/scripts/jme-builtins.js index 0c1242907..a045485c1 100644 --- a/runtime/scripts/jme-builtins.js +++ b/runtime/scripts/jme-builtins.js @@ -364,7 +364,10 @@ newBuiltin('image',[TString, '[number]', '[number]'],THTML,null, { } var subber = new jme.variables.DOMcontentsubber(scope); var element = subber.subvars(img); - element.setAttribute('data-interactive', 'false'); + + // The subber replaces SVG images with tags which have an event listener for when the content loads, so they must be considered interactive. + element.setAttribute('data-interactive', element.tagName.toLowerCase() == 'object'); + return new THTML(element); } }); diff --git a/runtime/scripts/jme-variables.js b/runtime/scripts/jme-variables.js index e2abd7dd3..54c45eab5 100644 --- a/runtime/scripts/jme-variables.js +++ b/runtime/scripts/jme-variables.js @@ -804,7 +804,6 @@ DOMcontentsubber.prototype = { return element; } else if(tagName=='img') { if(element.getAttribute('src').match(/.svg$/i)) { - element.parentElement var object = element.ownerDocument.createElement('object'); for(var i=0;i