]> source.dussan.org Git - jquery-ui.git/commitdiff
Sortable: Always set placeholder size when necessary. Fixes #8262 - jQuery UI 1.8...
authorBertjh <bertjh@hotmail.com>
Thu, 19 Apr 2012 13:05:37 +0000 (09:05 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 19 Apr 2012 13:05:37 +0000 (09:05 -0400)
ui/jquery.ui.sortable.js

index 2813b5681c18e87f36faa1d0d4f5fcdb7917371e..5373967df85f7eefca1b6f13d87afeed5d8dee93 100644 (file)
@@ -673,9 +673,8 @@ $.widget("ui.sortable", $.ui.mouse, {
                                        // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
                                        if(className && !o.forcePlaceholderSize) return;
 
-                                       //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
-                                       if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
-                                       if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
+                                       p.height(self.currentItem.height());
+                                       p.width(self.currentItem.width());
                                }
                        };
                }