Opened 10 years ago

Closed 7 years ago

#16299 closed enhancement (patchwelcome)

dnd Mover.js doesn't works with position:fixed

Reported by: krater Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.13
Component: DnD Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:


When I have a DIV with position:fixed, and i want to move it with the Moveable- or Mover-Class, it's automatically set to position:absolute.

With this patch it will work, but only when the position is set with style="position:fixed" in the HTML DOM (FF 3.6.17). If I set the style in a css file with class oder id, s.position == "". Maybee there is another way to read this correct(?).

--- Mover.js.uncompressed.js    2012-09-20 15:58:23.000000000 +0200
+++ Mover.js    2012-11-06 22:15:45.000000000 +0100
@@ -54,7 +54,9 @@
                //              event processor for onmousemove/ontouchmove
                // e: Event
                //              mouse/touch event
-               autoscroll.autoScroll(e);
+        if(!="fixed")
+                   autoscroll.autoScroll(e);
                var m = this.marginBox;
      , {l: m.l + e.pageX, t: m.t + e.pageY}, e);
@@ -75,6 +77,7 @@
                        case "relative":
                        case "absolute":
+                        case "fixed":
                                // assume that left and top values are in pixels already
                                l = Math.round(parseFloat(s.left)) || 0;
                                t = Math.round(parseFloat( || 0;

Change History (1)

comment:1 Changed 7 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.