r2073 - trunk/ui

r2073 - trunk/ui


Author: paul.bakaus
Date: Fri Feb 13 04:26:44 2009
New Revision: 2073
Modified:
trunk/ui/ui.draggable.js
trunk/ui/ui.sortable.js
Log:
draggable,sortable: if the offset parent is the body, top/left values
should always be normalized to 0 (fixes #4141 - margin on body in safari
caused bump)
Modified: trunk/ui/ui.draggable.js
==============================================================================
--- trunk/ui/ui.draggable.js    (original)
+++ trunk/ui/ui.draggable.js    Fri Feb 13 04:26:44 2009
@@ -221,7 +221,7 @@
            po.top += this.scrollParent.scrollTop();
        }
-        if((this.offsetParent[0] == document.body && $.browser.mozilla)    //Ugly
FF3 fix
+        if((this.offsetParent[0] == document.body) //This needs to be actually
done for all browsers, since pageX/pageY includes this information
        || (this.offsetParent[0].tagName &&
this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie))
//Ugly IE fix
            po = { top: 0, left: 0 };
Modified: trunk/ui/ui.sortable.js
==============================================================================
--- trunk/ui/ui.sortable.js    (original)
+++ trunk/ui/ui.sortable.js    Fri Feb 13 04:26:44 2009
@@ -730,7 +730,7 @@
            po.top += this.scrollParent.scrollTop();
        }
-        if((this.offsetParent[0] == document.body && $.browser.mozilla)    //Ugly
FF3 fix
+        if((this.offsetParent[0] == document.body) //This needs to be actually
done for all browsers, since pageX/pageY includes this information
        || (this.offsetParent[0].tagName &&
this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie))
//Ugly IE fix
            po = { top: 0, left: 0 };