Skip to main content

Search and Top Navigation

#5663 closed feature (patcheswelcome)

Opened May 27, 2010 06:12PM UTC

Closed November 28, 2012 03:31AM UTC

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.

Attachments (0)
Change History (7)

Changed May 28, 2010 08:20PM UTC by VexedPanda comment:1

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 %.

Changed November 29, 2011 10:05PM UTC by ci@sikkerhed.org comment:2

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.

Changed November 29, 2011 10:35PM UTC by scottgonzalez comment:3

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

Changed June 26, 2012 01:22AM UTC by scottgonzalez comment:4

type: enhancementfeature

Changed October 11, 2012 09:02PM UTC by scottgonzalez comment:5

milestone: TBD1.10.0

Changed October 15, 2012 06:33PM UTC by bavanyo comment:6

status: newopen

Changed November 28, 2012 03:31AM UTC by scottgonzalez comment:7

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.