diff options
author | Eduardo Lundgren <eduardolundgren@gmail.com> | 2009-01-16 05:16:04 +0000 |
---|---|---|
committer | Eduardo Lundgren <eduardolundgren@gmail.com> | 2009-01-16 05:16:04 +0000 |
commit | 0065499e53fe3a134aa6ed8d451c8f1c76326d5d (patch) | |
tree | ecd9c6c7a164d425637eb57a3b7c8dae96546873 | |
parent | 9d3b03d5f759cd9474427c94e718a6aa6e923beb (diff) | |
download | jquery-ui-0065499e53fe3a134aa6ed8d451c8f1c76326d5d.tar.gz jquery-ui-0065499e53fe3a134aa6ed8d451c8f1c76326d5d.zip |
Fixed #3842
-rw-r--r-- | ui/ui.resizable.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js index c557444cd..fd68b8328 100644 --- a/ui/ui.resizable.js +++ b/ui/ui.resizable.js @@ -602,14 +602,21 @@ $.ui.plugin.add("resizable", "alsoResize", { _alsoResize = function(exp, c) { $(exp).each(function() { - var start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left']; + var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left']; $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) { var sum = (start[prop]||0) + (delta[prop]||0); if (sum && sum >= 0) style[prop] = sum || null; }); - $(this).css(style); + + //Opera fixing relative position + if (/relative/.test(el.css('position')) && $.browser.opera) { + self._revertToRelativePosition = true; + el.css({ position: 'absolute', top: 'auto', left: 'auto' }); + } + + el.css(style); }); }; @@ -621,6 +628,14 @@ $.ui.plugin.add("resizable", "alsoResize", { }, stop: function(event, ui){ + var self = $(this).data("resizable"); + + //Opera fixing relative position + if (self._revertToRelativePosition && $.browser.opera) { + self._revertToRelativePosition = false; + el.css({ position: 'relative' }); + } + $(this).removeData("resizable-alsoresize-start"); } }); |