Skip to main content

Search and Top Navigation

#7692 closed bug (fixed)

Opened September 05, 2011 05:26AM UTC

Closed November 28, 2011 09:53PM UTC

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.

Attachments (0)
Change History (3)

Changed September 14, 2011 04:04PM UTC by scottgonzalez comment:2

status: newopen

Changed November 28, 2011 09:53PM UTC by James Khoury comment:3

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