Opened 12 years ago
Closed 11 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:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Status: | new → open |
---|
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
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.
fix: https://github.com/JamesKhoury/jquery-ui/commit/7a342871f7a1244246b71e28358476d63d25b1fc