Skip to content

Commit a66f2d7

Browse files
committed
Merge pull request cocos2d#2209 from dingpinglv/Iss5879_ccMenu
Closed #5879: Fixed a bug of cc.Menu that its item's touch priority is different to cc.eventManager
2 parents d1103fe + 0a375b0 commit a66f2d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/menus/CCMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ cc.Menu = cc.Layer.extend(/** @lends cc.Menu# */{
602602
var touchLocation = touch.getLocation();
603603
var itemChildren = this._children, locItemChild;
604604
if (itemChildren && itemChildren.length > 0) {
605-
for (var i = 0; i < itemChildren.length; i++) {
605+
for (var i = itemChildren.length - 1; i >= 0; i--) {
606606
locItemChild = itemChildren[i];
607607
if (locItemChild.isVisible() && locItemChild.isEnabled()) {
608608
var local = locItemChild.convertToNodeSpace(touchLocation);

0 commit comments

Comments
 (0)