Prevent browser pop on taphold event

Abhishek Jain picture Abhishek Jain · May 2, 2011 · Viewed 10.5k times · Source

In a jquery-mobile based web app, how do i prevent the default browser menu from showing on "tap hold" .. instead i want to show a custom dialog page ..

mentioned below is my code as of now ..

$(".task_row").bind('taphold',function(event, ui){
    event.preventDefault();
    $("#slide_down_menu").trigger('click');
});

Answer

axel freudiger picture axel freudiger · Apr 3, 2012

use css:

a {
    -webkit-touch-callout: none !important; 
}

to not show the standard dialog