Skip to main content

Search and Top Navigation

#5531 closed bug (fixed)

Opened April 19, 2010 10:47PM UTC

Closed July 30, 2010 07:15PM UTC

Last modified November 19, 2010 06:26PM UTC

dialog width should be at least minWidth on creation

Reported by: zhaoz Owned by:
Priority: major Milestone: 1.8.3
Component: ui.dialog Version: 1.8
Keywords: Cc:
Blocked by: Blocking:
Description

Right now, when .dialog() is called, the minWidth is not respected until resize.

That is, if minwidth is 500px, and the width is 300px. The dialog would be created with a width of 300px instead of 500px. However, after resizing the minWidth applies.

Expected Behaivior:

  • The dialog should never have a width of less than minWidth
  • dialog should not be created with a width less than minwidth

Observed Behaivior:

  • dialog on creation is created with a width less than minwidth, when (width < minwidth)
Attachments (1)

patch for minWidth issue

Change History (11)

Changed April 19, 2010 10:50PM UTC by zhaoz comment:1

I have a fix here: http://github.com/zhaoz/jquery-ui/commit/19388da8d7c50203a5a15dba063d5052346d3bb4

Unsure if that is an acceptable location for commits, will attach a patch as well.

Changed April 20, 2010 06:27AM UTC by zhaoz comment:2

This needs to be filed under ui.dialog... sorry. I don't think I have the ability to change it though.

Changed July 30, 2010 11:36AM UTC by jzaefferer comment:3

component: ui.coreui.dialog
priority: minormajor

We generally don't modify options, so that bounded value needs to be stored elsewhere. Otherwise valid.

Changed July 30, 2010 01:39PM UTC by scottgonzalez comment:4

milestone: TBD1.9

The width option is actually a "live" value, it gets updated during resizes in order to properly maintain state. So modifying it on create is okay. We'll also need to modify it if the minWidth is adjusted after create. Commented on commit as well.

Changed July 30, 2010 04:47PM UTC by zhaoz comment:5

Fixed, rebased, and amended.

http://github.com/zhaoz/jquery-ui/commit/332e3fbe2b1bfd8f5d495d35b8388e8b90fa430f

I won't be updating the patch since github seems to be preferred.

Changed July 30, 2010 04:50PM UTC by zhaoz comment:6

Just realized last fix still allows people to set width through options and bypass minWidth, will amend and resubmit.

Changed July 30, 2010 05:02PM UTC by zhaoz comment:7

Changed July 30, 2010 05:24PM UTC by zhaoz comment:8

Changed July 30, 2010 07:15PM UTC by scottgonzalez comment:9

resolution: → fixed
status: newclosed

Fixed in c5770c0. Thanks zhaoz.

Changed August 04, 2010 01:23AM UTC by scottgonzalez comment:10

milestone: 1.91.8.3

Changed November 19, 2010 06:26PM UTC by Ziling Zhao comment:11

Dialog: modified so that minWidth is respected. Fixes #5531 - dialog width should be at least minWidth on creation.

Changeset: c5770c0e84b786ebe55a60034da0ff06dc02f422