Block mobile browser popup by pressing screen element

0

Description:

A friend is developing an application where a web page is accessed and when interacting with the elements is sent to a PHP commands file to manipulate a robot with Arduino . For now we are doing only connect the leds, the following is done using the events of jQuery :

  • mousedown touchstart : To connect the led when you have the mouse pressed on the element using a desktop and mobile browser.

  • mouseup touchend : To turn off the LED when you do not have the mouse pressed on the element using a desktop and mobile browser.

  • Problem:

    In the mobile browser, be it Chrome or Firefox, when you press and hold for a few seconds the popup pops up to perform an action with the browser, but I just want to turn the LED on and off and the popup is in the way to turn off the led.

    Correct Procedure

    Do not pop up and allow the led to turn off.

    Attachments

        
    asked by anonymous 26.02.2017 / 01:53

    1 answer

    0

    The problem has been solved by adding the following block CSS :

    img {
        -webkit-touch-callout: none !important; 
    }
    
        
    02.03.2017 / 02:43