views:

7

answers:

0

I am trying to do something like the following in my firefox plugin - I open a sidebar on which I show certain UI elements (like an image) and allow people to drag and drop those images from the sidebar onto the document. I am trying to achieve my goal by doing this:

    var currentWindow = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser");
    var grabWin = currentWindow.getBrowser().contentWindow;
    var mainDoc = currentWindow.getBrowser().contentDocument;

    $(mainDoc).bind('mousemove', mouseMove); // I am using jquery here

Now mouseMove is a function I've written in my firefox plugin's code. However, I notice that if I musedown on the image in the sidebar and then move the mouse (essentially drag) then the mouseMove() is not being called.

Is there any way that I can capture this event on the document's mouse-move?

Thanks Kapil