Skip to content

Commit

Permalink
fix once and on touchEventDispatching difference (cocos#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
PPpro authored and jareguo committed Sep 25, 2018
1 parent 42c26a9 commit d6ec4c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocos2d/core/event-manager/CCEventManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ var eventManager = {

_onTouchEventCallback: function (listener, argsObj) {
// Skip if the listener was removed.
if (!listener._isRegistered)
if (!listener._isRegistered())
return false;

var event = argsObj.event, selTouch = event.currentTouch;
Expand Down Expand Up @@ -521,7 +521,7 @@ var eventManager = {
return true;
}

if (isClaimed && listener._registered && listener.swallowTouches) {
if (isClaimed && listener.swallowTouches) {
if (argsObj.needsMutableSet)
argsObj.touches.splice(selTouch, 1);
return true;
Expand Down

0 comments on commit d6ec4c0

Please sign in to comment.