From a1b32b59d57c2171af9ba0ed6b35ccde28794e3b Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sat, 17 Nov 2012 01:29:39 -0500 Subject: Resizable: use css() instead of position() for absolute placement. Fixes #3815 - Resizable: absolutely positioned element inside scrollable element is repositioned when resized --- ui/jquery.ui.resizable.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index 50cc19e47..41f3c03c0 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -266,10 +266,11 @@ $.widget("ui.resizable", $.ui.mouse, { el = this.element; this.resizing = true; - this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() }; // bugfix for http://dev.jquery.com/ticket/1749 - if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) { + if ( (/absolute/).test( el.css('position') ) ) { + el.css({ position: 'absolute', top: el.css('top'), left: el.css('left') }); + } else if (el.is('.ui-draggable')) { el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left }); } -- cgit v1.2.3