aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-02-13 03:36:56 +0000
committerScott González <scott.gonzalez@gmail.com>2009-02-13 03:36:56 +0000
commita5d5c4f60aff33da4f4aeb030cb0faca4b2aaf94 (patch)
tree2027665e6e01fbef165dff7a434cc8445e4e7726 /ui
parent2916159a088f20eb33602d69c97b79792dd5c037 (diff)
downloadjquery-ui-a5d5c4f60aff33da4f4aeb030cb0faca4b2aaf94.tar.gz
jquery-ui-a5d5c4f60aff33da4f4aeb030cb0faca4b2aaf94.zip
Resizable:
- Fixed destroy method. - Removed preventDefault option (Fixed #4135 - preventDefault should not be an option as there's not use case for false).
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.resizable.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js
index a0503c456..bea9b4de1 100644
--- a/ui/ui.resizable.js
+++ b/ui/ui.resizable.js
@@ -57,7 +57,8 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
//Prevent Safari textarea resize
- if ($.browser.safari && o.preventDefault) this.originalElement.css('resize', 'none');
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
//Push the actual element to our proportionallyResize internal array
this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
@@ -183,17 +184,19 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
//TODO: Unwrap at same DOM position
if (this.elementIsWrapper) {
_destroy(this.element);
- this.wrapper.parent().append(
+ var wrapper = this.element;
+ wrapper.parent().append(
this.originalElement.css({
- position: this.wrapper.css('position'),
- width: this.wrapper.outerWidth(),
- height: this.wrapper.outerHeight(),
- top: this.wrapper.css('top'),
- left: this.wrapper.css('left')
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
})
).end().remove();
}
+ this.originalElement.css('resize', this.originalResizeStyle);
_destroy(this.originalElement);
},
@@ -514,7 +517,6 @@ $.extend($.ui.resizable, {
maxWidth: null,
minHeight: 10,
minWidth: 10,
- preventDefault: true,
zIndex: 1000
}
});