Pong movement problem?

Hello guys.
I’m working on a pong game for mobile and I have a problem.
I want to control the player with the touch (obv). So if you press to the right it goes to the right and vice versa.
But, if I press on one of the buttons it just continues to go right, no matter if I release the button.
The condition is that if Che cursor is on Che object right (right button) and non on the object left it should go right, why if I release it will continue?
I see that there’s the same problem in the breakout example, if you play it from a smartphone it won’t stop.
Please let me know if you have similar problems and how can solve this
Thanks