]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable - fixed #3074
authorEduardo Lundgren <eduardolundgren@gmail.com>
Tue, 8 Jul 2008 17:39:07 +0000 (17:39 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Tue, 8 Jul 2008 17:39:07 +0000 (17:39 +0000)
ui/ui.resizable.js

index ecddd9a1e9c4d86f9f1077464a2799bd20e1e55d..7b681af55d6a39e2068af19cca37e4631d0fe755 100644 (file)
@@ -289,6 +289,11 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
                
                var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
                
+               if (o.containment) {
+                       curleft += $(o.containment).scrollLeft()||0;
+                       curtop += $(o.containment).scrollTop()||0;
+               }
+               
                //Store needed variables
                this.offset = this.helper.offset();
                this.position = { left: curleft, top: curtop };