diff --git a/js-runtime/lib/world/jsworld.js b/js-runtime/lib/world/jsworld.js index 4cad5c9..55993cf 100644 --- a/js-runtime/lib/world/jsworld.js +++ b/js-runtime/lib/world/jsworld.js @@ -584,7 +584,7 @@ if (config.lookup('onTap')) { var wrappedTap = function(w, e, k) { var x = e.pageX, y = e.pageY; - var currentElement = e.target; + var currentElement = e.target || e.srcElement; do { x -= currentElement.offsetLeft; y -= currentElement.offsetTop; diff --git a/js-runtime/lib/world/world.js b/js-runtime/lib/world/world.js index 0f965f6..51ff708 100644 --- a/js-runtime/lib/world/world.js +++ b/js-runtime/lib/world/world.js @@ -466,6 +466,7 @@ if (typeof(world) === 'undefined') { var that = this; this.animationHackImg = this.img.cloneNode(true); document.body.appendChild(this.animationHackImg); + this.animationHackImg.style.position = 'absolute'; this.animationHackImg.style.top = '-2000px'; if (this.animationHackImg.complete) { afterInit(that);