aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-01-29 15:25:02 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-01-29 15:25:02 +0000
commit04c063e5b7abe7fb1d9be52c01cdd409483340dd (patch)
tree56208e183148596811d9722cc96a5efc0f9aee1d /ui
parentb3ab79b859aaae81322d91edc01632068f2d56f1 (diff)
downloadjquery-ui-04c063e5b7abe7fb1d9be52c01cdd409483340dd.tar.gz
jquery-ui-04c063e5b7abe7fb1d9be52c01cdd409483340dd.zip
sortable: containment option now respects the padding (fixes #3958)
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.sortable.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js
index 0ff3107b4..614670c18 100644
--- a/ui/ui.sortable.js
+++ b/ui/ui.sortable.js
@@ -778,10 +778,10 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
var over = ($(ce).css("overflow") != 'hidden');
this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.helperProportions.height - this.margins.top
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
];
}