diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index 9c2fbfc..6373e86 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -193,7 +193,7 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event // TODO optimize by not check EVERY TIME! maybe half as often? // var rect = this.target.view.getBoundingClientRect(); @@ -219,7 +219,7 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event) { event.preventDefault(); - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event // loop through inteaction tree... // hit test each item! -> @@ -257,7 +257,7 @@ PIXI.InteractionManager.prototype.onMouseUp = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var global = this.mouse.global; @@ -390,7 +390,7 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var rect = this.target.view.getBoundingClientRect(); var changedTouches = event.changedTouches; @@ -415,7 +415,7 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event) { event.preventDefault(); - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var rect = this.target.view.getBoundingClientRect(); @@ -458,7 +458,7 @@ PIXI.InteractionManager.prototype.onTouchEnd = function(event) { - this.mouse.originalEvent = event; + this.mouse.originalEvent = event || window.event; //IE uses window.event var rect = this.target.view.getBoundingClientRect(); var changedTouches = event.changedTouches;