aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-11-17 01:29:39 -0500
committerMike Sherov <mike.sherov@gmail.com>2012-11-17 01:29:39 -0500
commita1b32b59d57c2171af9ba0ed6b35ccde28794e3b (patch)
tree757d4f5a68e5bbe28966c205c28fbbbe95f9cd62 /ui
parent9eaa572de189434521cf5cb307e37c2e65fb1f9f (diff)
downloadjquery-ui-a1b32b59d57c2171af9ba0ed6b35ccde28794e3b.tar.gz
jquery-ui-a1b32b59d57c2171af9ba0ed6b35ccde28794e3b.zip
Resizable: use css() instead of position() for absolute placement. Fixes #3815 - Resizable: absolutely positioned element inside scrollable element is repositioned when resized
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.resizable.js5
1 files changed, 3 insertions, 2 deletions
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 });
}