node touch 触发两次 cancel !!!!!!!!!!!!

给node添加触摸, start 之后, move会触发一个cancel, 在node之外结束触摸又触发一次cancel:

	this.spIcon.node.on(cc.Node.EventType.TOUCH_START, this._didClickItem.bind(this), this);
	this.spIcon.node.on(cc.Node.EventType.TOUCH_END, this._didClickItem.bind(this), this);
	this.spIcon.node.on(cc.Node.EventType.TOUCH_CANCEL, this._didClickItem.bind(this), this);
	this.spIcon.node.on(cc.Node.EventType.TOUCH_MOVE, this._didClickItem.bind(this), this);

node是scrollview上的,不知和这个有关系没!

你可以用 console.trace(‘touchcancel’) 看看调用堆栈

当真和scrollview有关系:

第一次caccel

第二次cacel

2.0.2也有这个问题,在Scrollview上添加Button,拖着button滑动时,会触发第一次cancel,如果手继续移动到Button以外的区域,会再次触发button的cancel事件。
这个算是Bug吗?
附一个DemoNewProject.zip (740.2 KB)

看你函数 touchend 跟touchcancel调用的同一个函数,有可能是你点击了触发了touchend,但是鼠标还是在那上面,继续触发move时间,然后你没有点击,鼠标移动到触摸区域外,有掉了touchcancel? 会不会是这种情况,你把touchend 跟touchcancel监听回调分开写,分别打印试试

我也遇到这个问题了,求解决

已解决

您是怎么解决的,可以交流一下吗