onDrag handler in FireFox?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tfrancis@gmail.com

    onDrag handler in FireFox?

    Hi,

    I am trying to handle my mouse movements myself in my JavaScript
    application which is ok except for the following problem.

    If I happen to click on an image and then move the mouse, the "no-drop"
    icon appears as the browser is starting to drage the image url
    somewhere. When this happens, I no longer recieve any mouse events in
    my JS app. This can be prevented in IE by adding an event handler for
    the onDrag event that simply returns false. This prevents IE from
    continuing to try and drag the image and instead it continues to send
    mouse events.

    However, I cannot find a way to do this in Firefox. Can anyone help?

    Cheers,

    Tom...

  • Martin Honnen

    #2
    Re: onDrag handler in FireFox?



    tfrancis@gmail. com wrote:
    [color=blue]
    > This can be prevented in IE by adding an event handler for
    > the onDrag event that simply returns false. This prevents IE from
    > continuing to try and drag the image and instead it continues to send
    > mouse events.
    >
    > However, I cannot find a way to do this in Firefox.[/color]

    <img onmousedown="if (event.preventD efault) {
    event.preventDe fault();
    }"

    --

    Martin Honnen

    Comment

    • tfrancis@gmail.com

      #3
      Re: onDrag handler in FireFox?


      Martin Honnen wrote:[color=blue]
      >
      > <img onmousedown="if (event.preventD efault) {
      > event.preventDe fault();
      > }"[/color]

      Perfik! Thanks Martin.

      Comment

      Working...