Mobile button debounce

The customer said that he was hitting the button accidentally and wanted to hold the button down for a longer time before the button action fired.
The obvious way would be to start a timer mouse down event and then read it in the mouse up event. That works great on a desktop app. On a mobile web app the OS kicks in its editing functions before the mouse up can even occur. So how can i debounce a button?

[quote=188061:@Theodore Ems]The customer said that he was hitting the button accidentally and wanted to hold the button down for a longer time before the button action fired.
The obvious way would be to start a timer mouse down event and then read it in the mouse up event. That works great on a desktop app. On a mobile web app the OS kicks in its editing functions before the mouse up can even occur. So how can i debounce a button?[/quote]

OK. It is not that simple. Indeed on an iPad the debouncing available by default on a computer is not available. But there is a good reason for that : iOS considers that a long press is a signal for the copy routine to appear. So if the button is pressed for longer than half a second the black “Copy” contextual menu appears and the button is selected for copy.

I see no way to get around that.

Michel
Yep seen this happen often. Since it has become a sticky item for the customer i plan on using a priming button that they must press before any other actions can occur. What will happen is the priming button must be hit and a timer started. If a another button is not pressed the timer fires and disables any button presses. If a button is pressed the timer gets restarted. The primer could be anything.

Thanks for your help.