Opened 8 years ago

Closed 8 years ago

#7692 closed bug (fixed)

Dialog height bug

Reported by: JamesKhoury Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.14
Keywords: Cc:
Blocked by: Blocking:

Description

When .ui-dialog class has a padding set the dialog is larger that specified by the options css:

 <div id="thedialog">Dialog Content</div>

 .ui-dialog
 {
   padding: 20px;
 }

 $("#thedialog").dialog({
    height: 200
 });

the dialog should be 200px but it is approx 240px (tested in chrome 12).

All that is needed to fix it is for the line in ui.dialog._size to change:

   nonContentHeight = this.uiDialog.css({
                height: "auto",
                width: options.width
            })
            .outerHeight();

For example see http://jsfiddle.net/ABKKk/ clicking the button in the example will toggle between current code and the above code.

Change History (3)

comment:2 Changed 8 years ago by Scott González

Status: newopen

comment:3 Changed 8 years ago by James Khoury

Resolution: fixed
Status: openclosed

Dialog: Modified the dialog._size() to use outerHeight in calculating the nonContentHeight. Fixed #7692 - dialog: dialog height bug is incorrect when .ui-dialog padding set.

Changeset: ce0afde900fb2b55b5766a3e0e3029e24a094a75

Note: See TracTickets for help on using tickets.