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
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.