Skip to main content

Search and Top Navigation

Ticket #3074: resizable_3074.patch
File resizable_3074.patch, 0.7 KB (added by oggy, July 21, 2009 12:46PM UTC)
--- jq/development-bundle/ui/ui.resizable.js	2009-06-12 03:20:44.000000000 +0200
+++ ui.resizable.js	2009-07-21 14:46:41.000000000 +0200
@@ -233,8 +233,11 @@
 		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;
+            var oc = o.containment;
+            var ce = (oc instanceof $) ? oc : ((/parent/.test(oc)) ? el.parent().get(0) : oc);
+            var containerElement = $(ce);
+			curleft += containerElement.scrollLeft() || 0;
+			curtop += containerElement.scrollTop() || 0;
 		}
 
 		//Store needed variables

Download in other formats:

Original Format