Skip to content

Commit a3abb3b

Browse files
committed
Merge pull request jquery#593 from tjvantoll/bug_6763
Resizable: Removed Opera relative/absolute positioning exception code.
2 parents 6079982 + f5e5971 commit a3abb3b

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

ui/jquery.ui.resizable.js

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ $.widget("ui.resizable", $.ui.mouse, {
5151
//Wrap the element if it cannot hold child nodes
5252
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
5353

54-
//Opera fix for relative positioning
55-
if (/relative/.test(this.element.css('position')) && $.browser.opera)
56-
this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
57-
5854
//Create a wrapper element and set the wrapper to the new current internal element
5955
this.element.wrap(
6056
$('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
@@ -248,10 +244,6 @@ $.widget("ui.resizable", $.ui.mouse, {
248244
el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
249245
}
250246

251-
//Opera fixing relative position
252-
if ($.browser.opera && (/relative/).test(el.css('position')))
253-
el.css({ position: 'relative', top: 'auto', left: 'auto' });
254-
255247
this._renderProxy();
256248

257249
var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
@@ -563,8 +555,7 @@ $.ui.plugin.add("resizable", "alsoResize", {
563555
var el = $(this);
564556
el.data("resizable-alsoresize", {
565557
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
566-
left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10),
567-
position: el.css('position') // to reset Opera on stop()
558+
left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
568559
});
569560
});
570561
};
@@ -596,12 +587,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
596587
style[prop] = sum || null;
597588
});
598589

599-
// Opera fixing relative position
600-
if ($.browser.opera && /relative/.test(el.css('position'))) {
601-
self._revertToRelativePosition = true;
602-
el.css({ position: 'absolute', top: 'auto', left: 'auto' });
603-
}
604-
605590
el.css(style);
606591
});
607592
};
@@ -614,25 +599,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
614599
},
615600

616601
stop: function (event, ui) {
617-
var self = $(this).data("resizable"), o = self.options;
618-
619-
var _reset = function (exp) {
620-
$(exp).each(function() {
621-
var el = $(this);
622-
// reset position for Opera - no need to verify it was changed
623-
el.css({ position: el.data("resizable-alsoresize").position });
624-
});
625-
};
626-
627-
if (self._revertToRelativePosition) {
628-
self._revertToRelativePosition = false;
629-
if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
630-
$.each(o.alsoResize, function (exp) { _reset(exp); });
631-
}else{
632-
_reset(o.alsoResize);
633-
}
634-
}
635-
636602
$(this).removeData("resizable-alsoresize");
637603
}
638604
});

0 commit comments

Comments
 (0)