]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #2988
authorEduardo Lundgren <eduardolundgren@gmail.com>
Thu, 26 Jun 2008 02:55:12 +0000 (02:55 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Thu, 26 Jun 2008 02:55:12 +0000 (02:55 +0000)
ui/ui.resizable.js

index 8ce8ee97955f89c774c0ec488a80d80fbb4707c9..3bc21cab6ec88ce8fd9ccac5fdee5379d0db5510 100644 (file)
@@ -536,10 +536,11 @@ $.ui.plugin.add("resizable", "containment", {
                        self.containerPosition = { left: 0, top: 0 };
                        
                        self.parentData = { 
-                               element: $(document), left: 0, top: 0, width: $(document).width(),
-                               height: $(document).height() || document.body.parentNode.scrollHeight
+                               element: $(document), left: 0, top: 0, 
+                               width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
                        };
                }
+               
                                
                // i'm a node, so compute top, left, right, bottom
                else{
@@ -561,7 +562,7 @@ $.ui.plugin.add("resizable", "containment", {
                                ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
                                pRatio = o._aspectRatio || e.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
                
-               if (/static/.test(ce.css('position')))
+               if (ce[0] != document && /static/.test(ce.css('position')))
                        cop = self.containerPosition;
                
                if (cp.left < (o.proxy ? co.left : cop.left)) {