Skip to content

Commit 36d44d1

Browse files
bertterheidescottgonzalez
authored andcommitted
Sortable: Always set placeholder size when necessary. Fixes #8262 - jQuery UI 1.8.19 don't respect forcePlaceholderSize.
(cherry picked from commit 4f19289)
1 parent 365e102 commit 36d44d1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ui/jquery.ui.sortable.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,8 @@ $.widget("ui.sortable", $.ui.mouse, {
674674
// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
675675
if(className && !o.forcePlaceholderSize) return;
676676

677-
//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
678-
if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
679-
if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
677+
p.height(self.currentItem.height());
678+
p.width(self.currentItem.width());
680679
}
681680
};
682681
}

0 commit comments

Comments
 (0)