I created an object
local obj = newCircle(...)
and insert it into a scrollView
scrollView:insert(obj)
and I create a touch listener for the object
obj:addEventListener("touch", objTouchListener)
In most cases, there is no problem for objTouchListener to receive all the event phases (began, move, ended)
However, there is one case, there is only began event and there is no subsequent move/ended events… here is how to reproduce it:
(1) swipe the finger on the scrollView
(2) lift finger
(3) the scrollView is still scrolling with its own momentum even though the finger is off the screen
(4) tap the object
Usually the tap in step (4) will generate began & ended events, which is good. But if you try a few times, you will see sometimes there is a began event for the tap but there is no ended event following.
Is this a bug?
I see this happening because I added some effect when user pressed the object in step (4), and waiting for the ended event to remove the effect. Now without the ended event, the effect is still there and I have no way to remove the effect if the ended event is missing.