Skip to main content

Search and Top Navigation

#3145 closed feature (fixed)

Opened July 30, 2008 01:55PM UTC

Closed December 21, 2008 04:54PM UTC

Last modified August 26, 2009 02:01PM UTC

ui.dialog automatic height based on the content

Reported by: cheeaun@gmail.com Owned by: scottgonzalez
Priority: major Milestone: 1.7
Component: ui.dialog Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:
Description

The current jQuery.UI.Dialog has a default height of 200px. It would be better if the height is calculated automatically based on the height of the content *if* the width is specified either by default or Options.

This proves to be useful as the height doesn't have to be reset over and over again when the content changes.

Attachments (1)
Change History (10)

Changed August 01, 2008 08:50AM UTC by scottgonzalez comment:1

owner: scott.gonzalezrdworth
status: newassigned

Changed August 17, 2008 10:22AM UTC by Cloudream comment:2

milestone: → TDB

Changed December 19, 2008 08:17PM UTC by scottgonzalez comment:3

We could potentially support height: auto as an option, though I don't think this should be the default behavior.

Changed December 20, 2008 04:17PM UTC by scottgonzalez comment:4

owner: rdworthscott.gonzalez
priority: minormajor
status: assignedaccepted

I've attached a patch to support height: 'auto'. This should be used with the following CSS:

.ui-dialog-content {
    overflow-y: auto;
}

Changed December 20, 2008 04:30PM UTC by scottgonzalez comment:5

Amending my previous comment: The overflow-y: auto should be used all the time, even without this patch.

Changed December 21, 2008 04:54PM UTC by scottgonzalez comment:6

milestone: TBD1.6
resolution: → fixed
status: acceptedclosed

Fixed in r1197.

Changed December 22, 2008 08:47AM UTC by wichert comment:7

Why set the height at all? height:auto behaves differently than not setting height at all and might actively break something. Perhaps allow height: undefined to be passed in to support that?

Changed December 22, 2008 09:39PM UTC by scottgonzalez comment:8

What behavior would you expect that would be different from height: auto if you didn't specify a height? And what could height: auto break?

Changed December 22, 2008 09:43PM UTC by scottgonzalez comment:9

Wichert, please respond in the jquery-ui-dev group. Thanks.

Changed February 09, 2009 05:07AM UTC by wutwjd comment:10

I would expect that if options.shadow is set to true that auto-resizing would also change the height of the shadow as well. If we could reopen this ticket with this issue, that'd be great.