Touch event wont fire "ended" while in a scrollview

I have an image inside a scrollview with a touch even on it. When I return true from the touch event then it fires the “ended” event howerver then the scrollview wont work. If I don’t return true then the scrollview works but it will never fire the ended event. Is there a way to fix this by any chance or is it just how it should function?

Hi @dmglakewood,

Can you be a little more specific? If you want to “block” the touch event at the level of the image by returning true, what do you want to happen to the scrollView? Do you want it to receive a touch event or not?

Brent

I would like to not have the image block the event so if I’m holding on the image and then decide to move my finger up or down I would like the scrollview to move up or down. This works if I don’t block the event on the image, however the phases moved and ended never get called on the image. So if I hold down on an image the began event gets called then if I move my finger it moves the scroll view and then moved doesn’t get called or the ended. If I block the event on the image then the scrollview wont scroll but all the touch events on the image get called correctly.

Hi @dmglakewood,

I think what you need to implement is the example that uses “:takeFocus()”:

https://docs.coronalabs.com/api/type/ScrollViewWidget/takeFocus.html

Brent

Hi @dmglakewood,

Can you be a little more specific? If you want to “block” the touch event at the level of the image by returning true, what do you want to happen to the scrollView? Do you want it to receive a touch event or not?

Brent

I would like to not have the image block the event so if I’m holding on the image and then decide to move my finger up or down I would like the scrollview to move up or down. This works if I don’t block the event on the image, however the phases moved and ended never get called on the image. So if I hold down on an image the began event gets called then if I move my finger it moves the scroll view and then moved doesn’t get called or the ended. If I block the event on the image then the scrollview wont scroll but all the touch events on the image get called correctly.

Hi @dmglakewood,

I think what you need to implement is the example that uses “:takeFocus()”:

https://docs.coronalabs.com/api/type/ScrollViewWidget/takeFocus.html

Brent