mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
Fix event handler not activated if register before active
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user