r870 - trunk/ui

r870 - trunk/ui


Author: paul.bakaus
Date: Thu Nov 6 06:52:25 2008
New Revision: 870
Modified:
trunk/ui/ui.draggable.js
Log:
draggable: fixed nasty IE related scrolling bug - funny IE includes scroll
if you call offset() on <html>
Modified: trunk/ui/ui.draggable.js
==============================================================================
--- trunk/ui/ui.draggable.js    (original)
+++ trunk/ui/ui.draggable.js    Thu Nov 6 06:52:25 2008
@@ -109,7 +109,8 @@
        
        
        this.offsetParent = this.helper.offsetParent(); var po =
this.offsetParent.offset();            //Get the offsetParent and cache its position
-        if(this.offsetParent[0] == document.body && $.browser.mozilla) po = {
top: 0, left: 0 };        //Ugly FF3 fix
+        if(this.offsetParent[0] == document.body && $.browser.mozilla) po = {
top: 0, left: 0 };                                                    //Ugly FF3 fix
+        if(this.offsetParent[0].tagName &&
this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie) po
= { top: 0, left: 0 };        //Ugly IE fix
        this.offset.parent = {                                                                            //Store its position plus border
            top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) ||
0),
            left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) |
| 0)
@@ -240,7 +241,7 @@
        };
    },
    _generatePosition: function(e) {
-        
+    
        var o = this.options;
        var position = {
            top: (