aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2013-01-26 15:31:27 -0500
committerTJ VanToll <tj.vantoll@gmail.com>2013-03-07 21:42:28 -0500
commit6358695df18722d8c7e99437365db42cf4957626 (patch)
treee4f9b9cab877b05457e4ae0fa470f2b49b019344 /ui
parent5b2da7c127aa1afd9852063b6e4701ec6607e941 (diff)
downloadjquery-ui-6358695df18722d8c7e99437365db42cf4957626.tar.gz
jquery-ui-6358695df18722d8c7e99437365db42cf4957626.zip
Draggable: Fix border containment. Fixed #5569 - Draggable: Containment incorrectly calculates padding and border
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.draggable.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 7c1fb3361..56b8fc77d 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -421,8 +421,8 @@ $.widget("ui.draggable", $.ui.mouse, {
this.containment = [
(parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
(parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
- (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 - this.margins.right,
- (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 - this.margins.bottom
+ (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderRightWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
+ (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderBottomWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
];
this.relative_container = c;