Skip to content

Commit

Permalink
Dialog: Removed the height() tinkering which stops the dialog from sh…
Browse files Browse the repository at this point in the history
…rinking. Fixes #5916 - Dialog: shrinks on drag in IE in standards mode, worse in quirksmode.
  • Loading branch information
fracmak authored and scottgonzalez committed May 27, 2011
1 parent c7eae7b commit e34dbfe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ui/jquery.ui.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,7 @@ $.widget("ui.dialog", {
_makeDraggable: function() {
var self = this,
options = self.options,
doc = $( document ),
heightBeforeDrag;
doc = $( document );

function filteredUi( ui ) {
return {
Expand All @@ -388,9 +387,7 @@ $.widget("ui.dialog", {
handle: ".ui-dialog-titlebar",
containment: "document",
start: function( event, ui ) {
heightBeforeDrag = options.height === "auto" ? "auto" : $( this ).height();
$( this )
.height( $( this ).height() )
.addClass( "ui-dialog-dragging" );
self._trigger( "dragStart", event, filteredUi( ui ) );
},
Expand All @@ -403,8 +400,7 @@ $.widget("ui.dialog", {
ui.position.top - doc.scrollTop()
];
$( this )
.removeClass( "ui-dialog-dragging" )
.height( heightBeforeDrag );
.removeClass( "ui-dialog-dragging" );
self._trigger( "dragStop", event, filteredUi( ui ) );
$.ui.dialog.overlay.resize();
}
Expand Down

0 comments on commit e34dbfe

Please sign in to comment.