_makeDraggable: function() {
var self = this,
options = self.options,
- doc = $( document ),
- heightBeforeDrag;
+ doc = $( document );
function filteredUi( ui ) {
return {
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 ) );
},
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();
}