Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#3145 closed feature (fixed)

ui.dialog automatic height based on the content

Reported by: [email protected] Owned by: Scott González
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)

dialog-height-auto-r1184.patch (1.3 KB) - added by Scott González 14 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 15 years ago by Scott González

Owner: changed from scott.gonzalez to rdworth
Status: newassigned

comment:2 Changed 15 years ago by Cloudream

Milestone: TDB

comment:3 Changed 14 years ago by Scott González

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

Changed 14 years ago by Scott González

comment:4 Changed 14 years ago by Scott González

Owner: changed from rdworth to scott.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;
}

comment:5 Changed 14 years ago by Scott González

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

comment:6 Changed 14 years ago by Scott González

Milestone: TBD1.6
Resolution: fixed
Status: acceptedclosed

Fixed in r1197.

comment:7 Changed 14 years ago by wichert

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?

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

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?

comment:9 Changed 14 years ago by Scott González

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

comment:10 Changed 14 years ago by wutwjd

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.

Note: See TracTickets for help on using tickets.