Opened 10 years ago

Closed 7 years ago

#5663 closed feature (patcheswelcome)

dialog width/height should accept em

Reported by: mikepelley Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.dialog Version: 1.8.1
Keywords: dialog width height Cc:
Blocked by: Blocking:

Description

I've created a page that is sized primarily by 'em', other than images and borders. This works pretty well, and now I'm adding one of jquery-ui's handy dialog boxes.

I've created the content of the dialog box as a new PHP page, using 'em' again. I load that into the dialog, but the size is wrong. I discovered that I can only provide the dialog width/height in pixels.

It would be nice to be able to provide the width/height in em. Could those be modified to accept the width and units together, like '10px' or '5em'? Percentage units might be interesting as well, although I don't need those myself.

Change History (7)

comment:1 Changed 10 years ago by VexedPanda

Agreed. We're writing a PHP wrapper for jQuery's dialog box, and our framework traditionally supports em for sizes. But we don't know what to do when attempting to create a jQuery dialog box when given em or %.

comment:2 Changed 8 years ago by ci@…

I just tried to use "em" sizes with jQuery UI 1.8.9, and it seems the "width" parameter accepts "em" units, but "height" does not! What's going on? That's totally illogical.

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

There's nothing illogical about the fact that code does not work the way it was not meant to be used.

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

Type: enhancementfeature

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

Milestone: TBD1.10.0

comment:6 Changed 7 years ago by bavanyo

Status: newopen

comment:7 Changed 7 years ago by Scott González

Resolution: patcheswelcome
Status: openclosed

This gets really tricky when dealing with resizing and handling min/max. As I don't think we'll get support for that, I'm going to close this. If someone wants to provide a patch that makes everything work, we can consider it.

Note: See TracTickets for help on using tickets.