0
Description:
A friend is developing an application in which a web page is accessed and when interacting with the elements is sent to a file PHP
controls to manipulate a robot with the Arduino
. For now we are doing just turn on the leds, the following is done using the events of jQuery
:
mousedown touchstart: To turn on the led when the mouse is pressed on the element using a desktop and mobile browser.
mouseup touchend: To turn off the led when not with the mouse pressed on the element using a desktop and mobile browser.
Problem:
In mobile browser, be it Chrome or Firefox, while leaving pressed for a few seconds popup appears to perform an action with the browser, but I just want to turn on/off the led and the appearance of this popup is disturbing when turning off the led.
Proper procedure
Do not pop up and allow to turn off the led.
Attachments
within the function, you certainly have the event variable, commonly called
e
. You could try, first of all, to adde.preventDefault();
and check if the "problem" still occurs.– Ilario Junior