From cfbb7bc8e1def5814109c2781e32477f15ee4ac6 Mon Sep 17 00:00:00 2001 From: Eemeli Kelokorpi Date: Sat, 15 Feb 2014 13:38:15 +0200 Subject: [PATCH] Fixed issue with mouseupoutside not firing, when mouse is out of document body --- src/pixi/InteractionManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index 7d0b037..b80f144 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -204,7 +204,7 @@ PIXI.InteractionManager.prototype.setTargetDomElement = function(domElement) domElement.addEventListener('touchend', this.onTouchEnd, true); domElement.addEventListener('touchmove', this.onTouchMove, true); - document.body.addEventListener('mouseup', this.onMouseUp, true); + window.addEventListener('mouseup', this.onMouseUp, true); }; @@ -226,7 +226,7 @@ PIXI.InteractionManager.prototype.removeEvents = function() this.interactionDOMElement = null; - document.body.removeEventListener('mouseup', this.onMouseUp, true); + window.removeEventListener('mouseup', this.onMouseUp, true); }; /**