From e08faf33c648d0c75fbd5a2418e16ca463186857 Mon Sep 17 00:00:00 2001 From: Razvan Grigore Date: Mon, 25 May 2015 16:16:16 +0200 Subject: [PATCH] Resizable: Fix issue with border-box Fixes #8932 --- ui/resizable.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/resizable.js b/ui/resizable.js index 6e51f4aac9f..bd3cf9d8091 100644 --- a/ui/resizable.js +++ b/ui/resizable.js @@ -487,15 +487,18 @@ $.widget("ui.resizable", $.ui.mouse, { if ( this.position.left !== this.prevPosition.left ) { props.left = this.position.left + "px"; } + + this.helper.css( props ); + if ( this.size.width !== this.prevSize.width ) { props.width = this.size.width + "px"; + this.helper.width(this.size.width); } if ( this.size.height !== this.prevSize.height ) { props.height = this.size.height + "px"; + this.helper.height(this.size.height); } - this.helper.css( props ); - return props; }, @@ -995,7 +998,7 @@ $.ui.plugin.add("resizable", "alsoResize", { $(o.alsoResize).each(function() { var el = $(this); el.data("ui-resizable-alsoresize", { - width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), + width: parseInt(el.css("width"), 10), height: parseInt(el.css("height"), 10), left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) }); });