aboutsummaryrefslogtreecommitdiffstats
path: root/ui/resizable.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2014-08-04 08:18:35 -0400
committerMike Sherov <mike.sherov@gmail.com>2014-08-04 08:18:35 -0400
commit2779212a0e6e34fdea3f0d442e4d92218ac943fa (patch)
tree31e5e35d1e8526f5388f94fe6a8fbb9540379fb5 /ui/resizable.js
parent5ddc7cd4d325a78e6dae3b7fbdc6313294a6d637 (diff)
downloadjquery-ui-2779212a0e6e34fdea3f0d442e4d92218ac943fa.tar.gz
jquery-ui-2779212a0e6e34fdea3f0d442e4d92218ac943fa.zip
Resizable: Fix containment calculation with relative parent
Remove an incorrect fix introduced in 47cd5b6f that causes width calculations to be incorrect once the correct fix was introduced in c03cb807 Fixes #10140
Diffstat (limited to 'ui/resizable.js')
-rw-r--r--ui/resizable.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/ui/resizable.js b/ui/resizable.js
index b2e3a6626..8c65a12c8 100644
--- a/ui/resizable.js
+++ b/ui/resizable.js
@@ -774,7 +774,7 @@ $.ui.plugin.add( "resizable", "containment", {
},
resize: function( event ) {
- var woset, hoset, isParent, isOffsetRelative,
+ var woset, hoset,
that = $( this ).resizable( "instance" ),
o = that.options,
co = that.containerOffset,
@@ -815,13 +815,6 @@ $.ui.plugin.add( "resizable", "containment", {
woset = Math.abs( ( that._helper ? that.offset.left - cop.left : ( that.offset.left - co.left ) ) + that.sizeDiff.width );
hoset = Math.abs( ( that._helper ? that.offset.top - cop.top : ( that.offset.top - co.top ) ) + that.sizeDiff.height );
- isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
- isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
-
- if ( isParent && isOffsetRelative ) {
- woset -= Math.abs( that.parentData.left );
- }
-
if ( woset + that.size.width >= that.parentData.width ) {
that.size.width = that.parentData.width - woset;
if ( pRatio ) {