Fix event handler not activated if register before active

This commit is contained in:
pandamicro
2016-08-25 14:23:56 +08:00
parent a1c3494946
commit a96507d040
+1 -1
View File
@@ -1143,7 +1143,7 @@ var Node = cc.Class({
}
if (newAdded && !this._activeInHierarchy) {
cc.director.getScheduler().schedule(function() {
if (this._activeInHierarchy) {
if (!this._activeInHierarchy) {
cc.eventManager.pauseTarget(this);
}
}, this, 0, 0, 0, false);