cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

Hold on the button, and the touchEvent still keep execute when its node has been removed. #12513

Open RaoZiJian opened 9 years ago

RaoZiJian commented 9 years ago

The step is:

  1. Pressed the button, and hold on it.
  2. Remove, set visible false the button, keep your finger hold on the position
  3. Leave your finger now, and the touchEvent (ended event) would still be executed even when button is gone.

This could be prevented by several ways, it wouldn't take a long time. So maybe it should be fixed?

RaoZiJian commented 9 years ago

Cocos2d-x 3.3 with Lua. UIButton