]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Use .height() to calculate height of dialog before drag.
authorScott González <scott.gonzalez@gmail.com>
Wed, 24 Feb 2010 17:16:02 +0000 (17:16 +0000)
committerScott González <scott.gonzalez@gmail.com>
Wed, 24 Feb 2010 17:16:02 +0000 (17:16 +0000)
Fixes #5221 - Buttons disappear after dragging dialog.

ui/jquery.ui.dialog.js

index 0d48c1cf7a68b37c0c8134e2f00ab637fc7d1768..2e91a9e5aebbec119d5bacfaa61a9473dd8d3424 100644 (file)
@@ -332,7 +332,7 @@ $.widget("ui.dialog", {
                        handle: '.ui-dialog-titlebar',
                        containment: 'document',
                        start: function(event) {
-                               heightBeforeDrag = options.height;
+                               heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
                                $(this).height($(this).height()).addClass("ui-dialog-dragging");
                                self._trigger('dragStart', event);
                        },