Dialog box not honouring height when re-opened

Dialog box not honouring height when re-opened


Using the jQuery 1.6rc4 code-line I am having a problem getting a
dialog box to maintain its size when it is closed and reopened. The
first, third, fifth... openings render the dialog box at the specified
height, but the second, fourth, sixth... opening reduce the height of
the dialog box.
I'm not sure if this is a bug or to do with the way I am structuring
the code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
        <title>jQuery.UI.Dialog</title>
        <link rel="stylesheet" type="text/css" href="../../css/html.css"></
link>
        <link rel="stylesheet" type="text/css" href="flora.dialog.css"></
link>
        <script language="JavaScript" type="text/javascript" src="../../
jQuery/jquery-1.2.6.pack.js"></script>
        <script language="JavaScript" type="text/javascript" src="../../
jQuery.UI/jquery-ui-dialog-1.6rc4.packed.js"></script>
        <script type="text/javascript">
            $(function() {
                var $dlg = $("#dlg").dialog({
                    title: "My Test Dialog"
                    , autoOpen: false
                    , dialogClass: "flora"
                    , modal: false
                    , overlay: {
                        opacity: 0.5
                 , background: '#000'
                    }
                    , width: 300
                    , height: 200
                });
                $("#openDialog").click(function() {
                    $dlg.dialog("open");
                });
                $("#closeDialog").click(function() {
                    $dlg.dialog("close");
                });
            });
        </script>
    </head>
    <body>
        <div id="pageFrame">
            <h1>jQuery.UI.Dialog</h1>
            

<input id="openDialog" type="button" value="Open Dialog" />


            

<input id="closeDialog" type="button" value="Close Dialog" /></
p>
            <div id="dlg">
                This is my dialog!
            </div>
        </div>
    </body>
</html>