Skip to content
Permalink
Browse files
Sortable: Always set placeholder size when necessary. Fixes #8262 - j…
…Query UI 1.8.19 don't respect forcePlaceholderSize.

(cherry picked from commit 4f19289)
  • Loading branch information
bertterheide authored and scottgonzalez committed Apr 19, 2012
1 parent 365e102 commit 36d44d13e7a6c227944ddc42646b5bbe0f0e89ec
Showing with 2 additions and 3 deletions.
  1. +2 −3 ui/jquery.ui.sortable.js
@@ -674,9 +674,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());
}
};
}

0 comments on commit 36d44d1

Please sign in to comment.