Jump to content

[SOLVED] onmouseup not working


phpknight

Recommended Posts

I have the onmousedown and onmouseup working in the body tag.  But what I have noticed is that if I click on an image, it does the DOWN part.  But when I drag the mouse and let go, the UP event is not recognized.  The browser puts the circle with a slash through it as if it thinks I am trying to move the image, so the UP event does not work as it goes when no image is present.

 

Is there a way around this?

Link to comment
https://forums.phpfreaks.com/topic/168687-solved-onmouseup-not-working/
Share on other sites

What are you trying to achieve, exactly? Not recognizing a mouse click when the pointer is moved is standard behavior in a browser. Just try clicking a link on a web page and moving the mouse before releasing the button - the link will not be activated.

I got around this problem by making the image a background-image instead.  But that created another problem that I just posted.

 

I'm making a canvas that people can draw on.  Right now, I'm still working on the nuts and bolts of getting the functionality to work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.