I am writing an application in v2, and have a button where I have one action (increment a number) on tap, and another on press (start autoincrementing). The autoincrement is stopped on click, which means it happens on release of the button. There was a problem if the mouse “wanders” off the button during the press, which I fixed by adding a mouseup event to the container with the button, and ending the autoincrement.
This works fine in the desktop browser, but when I open the same app as a webpage on an iPhone, the mouseup in the container is not detected, meaning that the autoincrement continues when I release the press outside of the button.
I tried adding a touchend and on-release handler, but these do not work either.
If I press and the finger wanders off the button, how can I detect the release?
Thanks in advance.