We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34b9c0e commit 2d78665Copy full SHA for 2d78665
extensions/GUI/CCControlExtension/CCControl.js
@@ -318,7 +318,7 @@ cc.Control = cc.LayerRGBA.extend({
318
eventInvocationList.length = 0;
319
} else {
320
//normally we would use a predicate, but this won't work here. Have to do it manually
321
- for (var i = 0; i < eventInvocationList.length; i++) {
+ for (var i = 0; i < eventInvocationList.length; ) {
322
var invocation = eventInvocationList[i];
323
var shouldBeRemoved = true;
324
if (target)
@@ -328,6 +328,8 @@ cc.Control = cc.LayerRGBA.extend({
328
// Remove the corresponding invocation object
329
if (shouldBeRemoved)
330
cc.ArrayRemoveObject(eventInvocationList, invocation);
331
+ else
332
+ i ++;
333
}
334
335
},
0 commit comments