javascript - I'm trying to force mouseup event after mousedown -
elements[0].onmousedown = function(){ console.log('screen clicked.'); simulatemouseuphere; };
all need add in function triggers mouseup, if user holding click button down.
elements[0] entire page scope, anywhere click, trigger.
i'm pretty sure can call onmouseup event...
elements[0].onmousedown = function(){ console.log('screen clicked.'); elements[0].onmouseup(); };
keep in mind when physically stop holding mouse down though, mouseup event triggered again. (unless in onmouseup() event manage that)
tested quickly, looks works: http://jsfiddle.net/cucwn/40/
Comments
Post a Comment