diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-09-20 09:15:28 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-09-20 09:16:29 -0400 |
commit | 98a98a05d1a646a1e53b90020fe7c096acd1d933 (patch) | |
tree | dbeed84b4e1658ba7ffa2eea7592504cee1de17e | |
parent | 82b15951d123c7d68d50fec4a5decbc5af2816ba (diff) | |
download | jquery-ui-98a98a05d1a646a1e53b90020fe7c096acd1d933.tar.gz jquery-ui-98a98a05d1a646a1e53b90020fe7c096acd1d933.zip |
Dialog: Don't call draggable.destroy if we're not currently draggable. Fixes #6069 - DIALOG windows 1.8.5 draggapble problem.
-rw-r--r-- | ui/jquery.ui.dialog.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index c7ef437fc..029f91905 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -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) { @@ -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": |