diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-12-05 11:53:34 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-12-05 11:53:34 -0500 |
commit | f59f5a8b12d50c87ba6e2fe47a1804a23535b3cf (patch) | |
tree | 4bbc619ee12f8d99d09c7818cdfbbe043233ffdf /ui | |
parent | 70f5d18c715ba1c759393856f0f70acfddbee07a (diff) | |
download | jquery-ui-f59f5a8b12d50c87ba6e2fe47a1804a23535b3cf.tar.gz jquery-ui-f59f5a8b12d50c87ba6e2fe47a1804a23535b3cf.zip |
Dialog: Restore inline styles for dimensions/display. Fixes #8119 - Dialog: Destroying a dialog leaves some styles changed.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.dialog.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 96c998656..eac818fe0 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -84,6 +84,12 @@ $.widget("ui.dialog", { }, _create: function() { + this.originalCss = { + display: this.element[0].style.display, + width: this.element[0].style.width, + minHeight: this.element[0].style.minHeight, + height: this.element[0].style.height + }; this.originalTitle = this.element.attr( "title" ); this.options.title = this.options.title || this.originalTitle; this.oldPosition = { @@ -127,12 +133,7 @@ $.widget("ui.dialog", { this.element .removeUniqueId() .removeClass( "ui-dialog-content ui-widget-content" ) - .css({ - width: "", - minHeight: "", - height: "" - }) - .hide() + .css( this.originalCss ) // without detaching first, the following becomes really slow .detach(); |