aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-09-20 09:15:28 -0400
committerScott González <scott.gonzalez@gmail.com>2010-09-20 09:16:29 -0400
commit98a98a05d1a646a1e53b90020fe7c096acd1d933 (patch)
treedbeed84b4e1658ba7ffa2eea7592504cee1de17e
parent82b15951d123c7d68d50fec4a5decbc5af2816ba (diff)
downloadjquery-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.js11
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":