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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -