From ebe5dccdac739fd4ce4735b0c0516dad32851576 Mon Sep 17 00:00:00 2001 From: knoxHuang <821686174@qq.com> Date: Tue, 23 Aug 2016 11:08:05 +0800 Subject: [PATCH] fix _previousIn error for fireball/issues/3919 --- cocos2d/core/CCNode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index 0813c8a946..b62c241f9d 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -1205,6 +1205,10 @@ var Node = cc.Class({ } } + if (_currentHovered === this) { + _currentHovered = null; + } + cc.eventManager.removeListener(this._mouseListener); this._mouseListener = null; }