Skip to content

Commit 28fb436

Browse files
tjvantollscottgonzalez
authored andcommitted
Resizable: Removed Opera relative/absolute positioning exception code. Fixed #6763 - ui.dialog & resizable & button & opera 11
(cherry picked from commit f5e5971)
1 parent edd52ed commit 28fb436

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
@@ -50,10 +50,6 @@ $.widget("ui.resizable", $.ui.mouse, {
5050
//Wrap the element if it cannot hold child nodes
5151
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
5252

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

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

256248
var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
@@ -566,8 +558,7 @@ $.ui.plugin.add("resizable", "alsoResize", {
566558
var el = $(this);
567559
el.data("resizable-alsoresize", {
568560
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
569-
left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10),
570-
position: el.css('position') // to reset Opera on stop()
561+
left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
571562
});
572563
});
573564
};
@@ -599,12 +590,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
599590
style[prop] = sum || null;
600591
});
601592

602-
// Opera fixing relative position
603-
if ($.browser.opera && /relative/.test(el.css('position'))) {
604-
self._revertToRelativePosition = true;
605-
el.css({ position: 'absolute', top: 'auto', left: 'auto' });
606-
}
607-
608593
el.css(style);
609594
});
610595
};
@@ -617,25 +602,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
617602
},
618603

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

0 commit comments

Comments
 (0)