Skip to content

Commit

Permalink
Dialog: Don't call draggable.destroy if we're not currently draggable…
Browse files Browse the repository at this point in the history
…. Fixes #6069 - DIALOG windows 1.8.5 draggapble problem.
  • Loading branch information
scottgonzalez committed Sep 20, 2010
1 parent 82b1595 commit 98a98a0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ui/jquery.ui.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ $.widget("ui.dialog", {
_setOption: function(key, value){
var self = this,
uiDialog = self.uiDialog,
isResizable = uiDialog.is(':data(resizable)'),
isDraggable = uiDialog.is( ":data(draggable)" ),
isResizable = uiDialog.is( ":data(resizable)" ),
resize = false;

switch (key) {
Expand Down Expand Up @@ -552,10 +553,12 @@ $.widget("ui.dialog", {
}
break;
case "draggable":
if (value) {
if ( isDraggable && !value ) {
uiDialog.draggable( "destroy" );
}

if ( !isDraggable && value ) {
self._makeDraggable();
} else {
uiDialog.draggable('destroy');
}
break;
case "height":
Expand Down

0 comments on commit 98a98a0

Please sign in to comment.