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.
2 parents d1103fe + 0a375b0 commit a66f2d7Copy full SHA for a66f2d7
cocos2d/menus/CCMenu.js
@@ -602,7 +602,7 @@ cc.Menu = cc.Layer.extend(/** @lends cc.Menu# */{
602
var touchLocation = touch.getLocation();
603
var itemChildren = this._children, locItemChild;
604
if (itemChildren && itemChildren.length > 0) {
605
- for (var i = 0; i < itemChildren.length; i++) {
+ for (var i = itemChildren.length - 1; i >= 0; i--) {
606
locItemChild = itemChildren[i];
607
if (locItemChild.isVisible() && locItemChild.isEnabled()) {
608
var local = locItemChild.convertToNodeSpace(touchLocation);
0 commit comments