Is there any way to make double click programmatically something like
document.querySelector("button").blur()
but for double click, because document.querySelector("button").dblclick() isnt working...
Thank you.
One useful method of event is the preventDefault() method. preventDefault() will prevent whatever the browser would have done automatically when, say, a double click occurred.
var button= document.querySelector('button');
button.addEventListener('dblclick', function(event){
event.preventDefault();
},false);
}.} in the wrong place so the source code is also still incorrect.
jQueryisn't tagged in this question and the one you have posted is usingjQuery