From e318c29d656a1bdaf0c35b7fa371340411e3a616 Mon Sep 17 00:00:00 2001 From: Emmanuel Schanzer Date: Wed, 8 May 2013 08:18:11 -0600 Subject: [PATCH 1/2] we need to be sure the image is absolutely positioned, otherwise it will be visible in run-only mode --- js-runtime/lib/world/world.js | 1 + 1 file changed, 1 insertion(+) 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); From 13fb6b2cbfbc368fda404dd471c35fbae6c511a6 Mon Sep 17 00:00:00 2001 From: Emmanuel Schanzer Date: Thu, 9 May 2013 14:34:59 -0700 Subject: [PATCH 2/2] make sure onTap works for IE, which supports e.srcElement instead of e.target --- js-runtime/lib/world/jsworld.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;