This project is archived and is in readonly mode.

#198 ✓invalid

Drag&Drop slow in Firefox 3

Reported by Jerome | July 7th, 2008 @ 02:24 PM | in 2.0 (closed)

I run drag&drop in Firefox 3. When droppable zone was defined, the drag is very slow and this sacade. Is normal ?

Sorry for my english ;)

Comments and changes to this ticket

  • wihx12

    wihx12 July 13th, 2008 @ 12:59 PM

    • Tag set to 1.2

    I also encounter the same state in IE6 with using mootools1.2 .

    But using Drag&Drop of mootools1.1 ,the drag is very fluency

  • Yuffster

    Yuffster July 19th, 2008 @ 06:12 PM

    • State changed from “new” to “invalid”

    Invalid: Not enough information.

    "Slow" is a comparative value.

    If drag is exceptionally slow, please post code example and version information of your browser.

    If you have a patch to make it faster, please reopen.

  • Jerome

    Jerome July 21st, 2008 @ 08:47 AM


    I find why the Drag is slow. This take effect when I apply the style "position: relative" on a container. View the attachment please. There are a container with a relative position. This element contains five droppable DIV (class = drop) that can receive the drag element (ID = drag).

    My browner is Firefox 3.0.1 with Ubuntu 8.04. But I don't know if this bug is present in other browner or OS. (in Opera, this work correctly). mootools 1.2 and Drag plugin is used in this test page (view attachment).

    Thank you.

  • Jerome

    Jerome July 21st, 2008 @ 08:51 AM

    • no changes were found...
  • Jerome

    Jerome July 21st, 2008 @ 08:51 AM

    An error occurred when I post my preview comment. My attachment is not attach :(

  • Jan Kassens

    Jan Kassens July 21st, 2008 @ 09:41 AM

    I don't see a notable difference between 1.11 and 1.2 in your example.

    Using: Firefox 2 (presumably slower than 3), 2.16ghz core2duo, macosx

    admitted, that firefox isnt as fast as safari for example, but thats just the gecko engine. When I got time I'll do some profiling.

  • elado

    elado July 21st, 2008 @ 01:26 PM

    Drag & Drop is very slow if you have lots of droppables.

    That's because each mousemove it needs to check coordinates against a lot of elements (mouse x&y and all elements x/y/w/h).

    I've suggested once in the old forum (topic # 46768 if you have access) to try to work with the instead of x&y. In this way, we have to put the dragged element with some offset from the mouse pointer, otherwise will be the element itself.

  • Jerome

    Jerome July 24th, 2008 @ 02:51 PM


    I find that when I comment this line:

    line 208 in Drag.js : var overed = this.droppables.filter(this.checkAgainst, this).getLast();

    It work correctly. Also this is the same function as mootools 1.11. I find that functions getCoordinates and getPosition is very slow (why? I dont'nt know ^^). I replace line 202 : el = el.getCoordinates(); width this code from mootools 1.11:

    		var el1 = el, left = 0, top = 0;
    		do {
    			left += el1.offsetLeft || 0;
    			top += el1.offsetTop || 0;
    			el1 = el1.offsetParent;
    		} while (el1);
    		var position = {'x': left, 'y': top};
    		var el = {
    			'width': el.offsetWidth,
    			'height': el.offsetHeight,
    			'left': position.x,
    			'top': position.y
    		el.right = el.left + el.width;
    		el.bottom = + el.height;

    and it work perfectly !!!

    But I want if this code is correct ? For future bug, etc.

    Thx you.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins