Jump to content

onDrag - firefox issues


GingerRobot

Recommended Posts

Im having problems with the onDrag event in firefox - it seems to do absolutely nothing. Im wondering if this has an obvious solution - perhaps firefox doesn't support the onDrag event? If that's the case, does anyone know of an equivilant?

Any help would be much appreciated - as much as i hate IE, its doing me a favour by working at the moment and i dont like that :p
Link to comment
Share on other sites

Firefox doesn't support the ondrag trigger. You have to use a combination of onmouseover, onmousedown, onmouseup and onmouseout to know where your mouse cursor is and allow for a dragging feature. Basically, set each draggable object with a variable that turns true on mouseover (to let the browser know which object is currently able to be dragged), and false with mouseout. Then, when you have a mousedown event, just move whichever object is set to be able to be dragged, and you should have the equivalent of an ondrag event.

Hope this explanation helps.
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.